- ©«¤l
- 8
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 11
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-1-10
- ³Ì«áµn¿ý
- 2021-5-25
|
¦^´_ 2# solely
¦]¬°¤½¥qnªº®æ¦¡´N¬On³o¼Ë
°²³]¬O1¤ëªº²Ä¤@µ§¸ê®Æ´N¬O0101 ²Ä¤Gµ§0102...¥H¦¹Ãþ±À
©Ò¥H¤~·|³o»ò³Â·Ð.....
§Aªº¤èªk½T¹ê¥i¦æ
¥i¬O§Ú¤£ª¾¹Dn«ç»ò¹B¥Î¦b§Úªºµ{¦¡¸Ì±
µ{¦¡½X¦p¤U
Private Sub CommandButton1_Click()
direct = ThisWorkbook.Path & "\"
session2 = Month(Date) & "01"
Do
Set fs = CreateObject("Scripting.FileSystemObject")
b = fs.fileExists(direct & session2 & ".xls")
session2 = session2 + 1
Loop Until b = False
Var = MsgBox("¬O§_n¥t¦sÀɮצWºÙ " & session2 - 1, vbOKCancel, "¥t¦s´£¥Ü")
If Var = vbOK Then
Worksheets("Sheet1").Range("L1") = Date
direct = ThisWorkbook.Path & "\"
session1 = Month(Date) & "01"
Do
Set fs = CreateObject("Scripting.FileSystemObject")
a = fs.fileExists(direct & session1 & ".xls")
session1 = session1 + 1
Loop Until a = False
Application.DisplayAlerts = False
Sheets("Sheet3").Select
ActiveWindow.SelectedSheets.Delete
Application.DisplayAlerts = True
ActiveWorkbook.SaveAs Filename:=direct & session2 - 1 & ".xls", FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False
MsgBox "ÀɮצWºÙ " & session2 - 1 & " ¥t¦s¦¨¥\!!"
End If
If Var = vbCancel Then
End If
End Sub |
|