- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 277
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-12-23
|
¦^´_ 1# maiko
¬°¤F¯à§PÂ_¬O§_¦³¿ï¾Ü¸ê®Æ§¨¡A³Ì¦n«ü©wInitialFileName
¦]¬°¹ï¸Ü¤è¶ô¬On¨ú±o¸ê®Æ§¨¥Ø¿ý¡A©Ò¥H·í§A¥¼¿ï¨ú¸ê®Æ§¨(¸ê®Æ§¨¦WºÙÄæ¦ì¬°ªÅ¥Õ)«ö¤U½T©w¡ASelectedItems.Count ¤´µM·|¬O1- Sub OpenPath()
- Dim fd As FileDialog, FileName As String, FileFolder As String, StartFolder$
- Set fd = Application.FileDialog(msoFileDialogFolderPicker)
- StartFolder = "C:\Windows" '¦Û¦æקï¹ï¸Ü¤è¶ôªº¹w³]¸ê®Æ§¨¥Ø¿ý
- With fd
- .AllowMultiSelect = False
- Do
- '.InitialFileName = StartFolder '¹w³]¹ï¸Ü¤è¶ô¶}±Ò¦bC:\Windows\¸ê®Æ§¨¦WºÙÅã¥ÜWindows
- .InitialFileName = StartFolder & IIf(Right(StartFolder, 1) = "\", "", "\") '¹w³]¹ï¸Ü¤è¶ô¸ê®Æ§¨¦WºÙ¬°ªÅ¥Õ
- .Show
- If .SelectedItems.Count = 1 Then FileFolder = .SelectedItems(1)
- Loop Until FileFolder <> StartFolder And .SelectedItems.Count = 1
- End With
- Set fd = Nothing
- End Sub
½Æ»s¥N½X |
|