Board logo

標題: test post [打印本頁]

作者: chonman0320    時間: 2022-12-15 20:43     標題: test post

  1. Private Sub CommandButton2_Click()
  2.     Dim xWs As Worksheet
  3.     Dim cw, cs, csv As String
  4.     Dim reopenwk As Workbook
  5.     SaveToDirectory = "D:\12"
  6.     ThisWorkbook.ActiveSheet.Copy
  7.     xcsvFile = SaveToDirectory & "\" & ActiveSheet.Name & Format(Date, " yyyymmdd") & ".csv"
  8.     Application.ActiveWorkbook.SaveAs Filename:=xcsvFile, FileFormat:=xlCSV, CreateBackup:=False
  9.     Application.ActiveWorkbook.Saved = True
  10.     Application.ActiveWorkbook.Close
  11. End Sub
複製代碼





歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)