kindamark

Untitled

Dec 9th, 2021
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Sub SaveSheetAsCSV()
  2. Dim theName As String
  3. On Error GoTo Line1
  4. For Each sht In ActiveWindow.SelectedSheets
  5. sht.Copy
  6. theName = "硕對路徑" & sht.Name & ".csv"
  7. ActiveWorkbook.SaveAs Filename:=theName, FileFormat:=xlCSV
  8. ActiveWindow.Close
  9. Next
  10. Line1:
  11. End Sub
  12.  
Advertisement
Add Comment
Please, Sign In to add comment