- ©«¤l
- 20
- ¥DÃD
- 2
- ºëµØ
- 0
- ¿n¤À
- 30
- ÂI¦W
- 0
- §@·~¨t²Î
- win 7
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2012-11-7
- ³Ì«áµn¿ý
- 2014-12-27
|
[µo°Ý] ³Â·Ð¦U¦ì°ª¤â¬Ý¤@¤U ¦³Ãö³]©w¯S©w¹q¸£¶}±ÒVBAªº°ÝÃD
- Private Sub Workbook_Open()
- sfolda = "D:\"
- '³o¬O³]©wÀÉ®×·j´Mªº¥Ø¿ý¬°D:\ ¥i¦Û¦æ³]©w
- sname = "test.TXT"
- '³]©w§ä¤@Ó¦W¬°TEST.TXTªºÀÉ®×
- '½Ð¦Û¦æ§ó§ïÀɦW©ÎÀÉ®×Ãþ«¬,³Ì¦n¬O¯S§O¤@ÂI
- With Application.FileSearch
- .LookIn = sfolda
- .Filename = sname
- rsl = .Execute
- ' rsl¬O§ä¨ìªºÀɮ׼ƶq
- If rsl < 1 Then
- '¦pªG§ä¤£¨ìÀÉ®×rsl´N·|µ¥©ó0,«h°õ¦æ¤U±µ{¦¡
- MsgBox "½Ð¦b«ü©w¹q¸£§@·~¡A¤~¯à¶}±ÒÀÉ®×", vbOKOnly
- '´£¥Ü¨Ï¥ÎªÌ¦b«ü©w¹q¸£§@·~¤~¯à¶}±Ò
- ActiveWorkbook.Close SaveChanges:=False
- 'ª½±µÃö³¬ÀÉ®×
- End If
- End With
- ActiveSheet.Unprotect Password = "ABCD"
- '³o¬O¸Ñ°£¤u§@ªí±K½X
- End Sub
½Æ»s¥N½X ¥H¤W¬O§Ú¦bºô¸ô¤W§ä¨ì¥i³]©w¯S©w¹q¸£¶}±Òªºµ{¦¡½X
¥u¤£¹L..·í§Ú°õ¦æ®É «oµo¥Í¤F¥H¤U±¡ªp
¤£ª¾¹D¬O¤£¬O§ÚÁÙ¦³¤°»ò¨S³]©w¨ì ÁÙ¬O¦¹µ{¦¡½X¥»´N¦³¯Ê³´¦Ó¤£¥i°õ¦æ
¦A³Â·Ð¦U¸ô°ª¤âªº«ü±Ð ÁÂÁ |
|