- ©«¤l
- 216
- ¥DÃD
- 71
- ºëµØ
- 0
- ¿n¤À
- 292
- ÂI¦W
- 0
- §@·~¨t²Î
- window xp
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2012-6-27
- ³Ì«áµn¿ý
- 2024-9-28
|
¦^´_ 2# lpk187
§A¦n, §Ú¥[¤J¤F±K½X¿ù»~¥X²{MSGBOX¤Î°h¥X, ¦ýCOMMANDBUTTONÅܤF¦Ç¦â, ½Ð°Ý°ÝÃD¦b¨º??¨D«üÂI?
03 VBA ¥t¦s·sÀÉ OK 20150928.rar (27.31 KB)
- Private Sub CommandButton1_Click()
- Call Splitbook
- End Sub
- Sub Splitbook()
-
- aa = InputBox("½Ð¿é¤J±K½X")
- pass = "12345"
- If aa = pass Then
- CommandButton1.Enabled = False
- If aa <> pass Then
- MsgBox "¿ù»~¿é¤J"
- End If
- End If
- Dim xPath As String
- xPath = Application.ActiveWorkbook.Path
- Application.ScreenUpdating = False
- Application.DisplayAlerts = False
- For Each xWs In ThisWorkbook.Sheets
- xWs.Copy
- Application.ActiveWorkbook.SaveAs Filename:=xPath & "\" & xWs.Name & ".xlsx"
- Application.ActiveWorkbook.Close False
- Next
- Application.DisplayAlerts = True
- Application.ScreenUpdating = True
- End Sub
½Æ»s¥N½X |
|