EXCEL TOOLS
Excel Add-ins ที่พัฒนาโดยคุณสันติพงศ์ ณสุย (MVP Excel 2010-2020) ด้วยภาษา C# เพื่อแก้ไขปัญหาไฟล์ใหญ่ คำนวณนาน ทำงานช้า จัดการข้อมูลต่าง ๆ ที่ทำงานประจำวันได้อย่างสะดวกรวดเร็ว ดูตัวอย่างด้านล่าง ⬇ สนใจคลิกไปดูได้ที่นี่ครับ => Excel Tools
Excel Add-ins ที่พัฒนาโดยคุณสันติพงศ์ ณสุย (MVP Excel 2010-2020) ด้วยภาษา C# เพื่อแก้ไขปัญหาไฟล์ใหญ่ คำนวณนาน ทำงานช้า จัดการข้อมูลต่าง ๆ ที่ทำงานประจำวันได้อย่างสะดวกรวดเร็ว ดูตัวอย่างด้านล่าง ⬇ สนใจคลิกไปดูได้ที่นี่ครับ => Excel Tools
[code]
และปิดด้วย [/code]
ตัวอย่างเช่น [code]dim r as range[/code]
เพื่อให้แตกต่างจากข้อความทั่วไป สะดวกในการอ่านและทดสอบ (คลิกเพื่อดูตัวอย่าง)Code: Select all
Sub ExportScore()
Application.ScreenUpdating = False
Sheets("Exp").Select
Cells.Select
Selection.Copy
Workbooks.Add
Cells.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
MsgBox "กำลังส่งออกไฟล์ไปที่ C:\"
ActiveWorkbook.SaveAs "C:\" & Range("M2").Value
ActiveWindow.Close
Sheets("Exp").Select
Range("a2").Select
Sheets("main").Select
Application.ScreenUpdating = True
MsgBox "ส่งออกไฟล์ไปที่" & "C:\ เรียบร้อยแล้ว" & Range("M2").Value
End Sub
ขอบคุณครับช่วยปลด Password ของ VBA แล้วแนบไฟล์มาอีกทีครับ
Code: Select all
Sub ExportScore()
Application.ScreenUpdating = False
Sheets("Exp").Select
Cells.Select
Selection.Copy
Workbooks.Add
Cells.Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
MsgBox "กำลังส่งออกไฟล์ไปไว้ที่ C:\" & Range("m2").Value & ".xlsx"
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs "C:\" & Range("M2").Value
Application.DisplayAlerts = True
ActiveWindow.Close
Sheets("Exp").Select
Range("a2").Select
Sheets("main").Select
Application.ScreenUpdating = True
MsgBox "ส่งออกไฟล์ไปไว้ที " & "C:\" & Worksheets("Exp").Range("M2").Value & " เรียบร้อยแล้ว"
End Sub