ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] 2003»P2007±o¨ìªº¸ô®|®t²§

¦^´_  maiko InitialFileName¥u¬O§A¶}±ÒDialog®É¤@¶}©lªº¦ì¸m
stillfish00 µoªí©ó 2012-10-9 14:21



   

¦³­Ó¤p°ÝÃD¡G
±o¨ìªº¸ô®|¬O¡G
d:\SaveExcel\20121009
¨Ã¤£¬O¡G
d:\SaveExcel\20121009\
¤Ö¤F­Ó¡u\¡v²Å¸¹¡C

TOP

¦^´_ 1# maiko
  1. Sub OpenPath()
  2. Dim fd As FileDialog, FileName As String, FileFolder As String
  3. Set fd = Application.FileDialog(msoFileDialogFolderPicker)
  4. With fd
  5.     .AllowMultiSelect = False
  6.     If .Show = -1 Then
  7.         FileFolder = .SelectedItems(1)  '#1
  8.     Else
  9.         End
  10.     End If
  11. End With
  12. Sheet1.Range("F2") = FileFolder  '#2
  13. End Sub
½Æ»s¥N½X
InitialFileName¥u¬O§A¶}±ÒDialog®É¤@¶}©lªº¦ì¸m

TOP

        ÀR«ä¦Û¦b : ¡i¬O§_µo´§¤F¨}¯à¡H¡j¤H¶¡¹Ø©R¦]¬°µu¼È¡A¤~§óÅã±o¬Ã¶Q¡CÃø±o¨Ó¤@½ë¤H¶¡¡AÀ³°Ý¬O§_¬°¤H¶¡µo´§¤F¦Û¤vªº¨}¯à¡A¦Ó¤£­n¤@¨ý¨Dªø¹Ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD