- ©«¤l
- 59
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 108
- ÂI¦W
- 0
- §@·~¨t²Î
- winXp
- ³nÅ骩¥»
- office2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- «ÌªF
- µù¥U®É¶¡
- 2011-12-16
- ³Ì«áµn¿ý
- 2018-8-10
|
·PÁÂ2¦ì¤j¤jªº¦^µª¡A¦ý~~~ ¤p¾Ç¥Í¤£¯à¤U¸üÀɮתü~~:'(
¥¿¦bª¦2¼Ó¤j¤jªº³sµ²¤À¨É¡Aµ²ªG
Const ThePath = "C:\vbuse\"
Const DelPath = "C:\456\*.*"
Private Sub Workbook_Open()
SavePath = Dir(ThePath, 16)
If SavePath = "" Then
'MsgBox "«D¥»¤H¤Å¥Î"
'Kill DelPath §RÀÉ
'DelPath.Delete
ThisWorkbook.Close False
'Application.Quit
Else
'MsgBox "Åwªï¨Ï¥Î¥»¥\¯à"
End If
End Sub
Option Explicit
'¬°¨CÓªí©w¸qÁôÂæWºÙ
Sub AddPrivateNames()
Dim sht As Worksheet
'¦CÁ|
For Each sht In Worksheets
'¬°¨C¤@Ó¤u§@ªí«ü©w"¥¨¶°ªí¦ì¸m"
ThisWorkbook.Names.Add sht.Name & "!Auto_Activate", "=Macro1!$A$1", False
Next
End Sub
Sub HideMacroSheet()
'ÁôÂÃ¥¨¶°ªí
ThisWorkbook.Excel4MacroSheets(1).Visible = xlSheetHidden
End Sub
'3.¦bWorkbookªºopen¨Æ¥ó©I¥sHideMacroSheet¡BAddPrivateNames¤èªk
Option Explicit
Private Sub Workbook_Open() 'µo²{¤£¥¿½Tªº¦WºÙ-->«ç»ò·|³o¼Ëªü
HideMacroSheet
AddPrivateNames
End Sub
¦³½Ð¤j¤jÌÀ°¦£¤F |
|