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

GetOpenFilename «ü©wºô¸ôªÚ¾F¸ô®|

GetOpenFilename «ü©wºô¸ôªÚ¾F¸ô®|

ChDrive "D\"
ChDir "D:\test\123\"
fileToOpen = Dir(Application.GetOpenFilename("All Files(*.xls),*.xls"))
¥H¤W¬O¹w³]¦n¶}±ÒÂÂÀɮɪº¸ô®|¬°D±ätest¸ê®Æ§¨©³¤Uªº123¸ê®Æ§¨
¥B¥i¥¿½T°õ¦æ

¨º¦pªG·Q±N¸ô®|§ï¬°ºô¸ôªÚ¾F¤¤ªº¸ê®Æ§¨©O?
ex:Microsoft Windows Network¤¤ªºDomain¤¤ªºWoc©³¤Uªºtest¸ê®Æ§¨
§Ú¼g¦¨³o¼Ë
ChDrive "Domain\\"
ChDir "Woc\test"
fileToOpen = Dir(Application.GetOpenFilename("All Files(*.xls),*.xls"))

¥i¬OChDir "Woc\test"³o¦æ«o¦]§ä¤£¨ì¸ô®|¦Ó¿ù»~

¦³¸ÕµÛ¥ÎÀÉ®×Á`ºÞ¶}±ÒDomain
¦ý«o¥X²{µLªk¦s¨úDomain,§ä¤£¨ìºô¸ô¸ô®|
¦ý¬O§Ú«o¥i¥H¶}±ÒWoc©³¤UªºªF¦è
½Ð°Ý¸Ó¦p¦ó­×§ï©O
ÁÂÁÂ

¦^´_ 4# stillfish00


ÁÂÁ¦^ÂÐ
§Úª¾¹D°ÝÃD¥X¦b­þ¤F
¬O¦b©ó·d¿ù¤F¹q¸£¦WºÙ
¨ä¹êWoc¤~¬O¹q¸£¦WºÙ

¥t¥~Ãö©óºô¸ôºÏºÐ¾÷
¦]¬°¹q¸£ÄÝ©óXP
¤]¨S±µÄ²¹L³o°Ï¶ô
©Ò¥H¤~·|¤£ª¾¹D«ç»ò³sµ²

·PÁ¤j¤j¦^ÂÐ

TOP

¦^´_ 3# t591nm
§Ú¸Õ¹L¥i¥H¡AÀˬd§A¸ô®|¬O¤£¬O¶ñ¿ù©Î¼gªk¼g¿ù§a
¦@¥Î¸ê®Æ§¨¸ô®|³£¬O  \\¹q¸£¦WºÙ\¸ê®Æ§¨¦WºÙ
§Aªº"Domian"¬Oºô¸ôªÚ¾Fªº¹q¸£¶Ü.....???

"³s½uºÏºÐ¾÷" google ¤@¤U¡A²Ä¤@¶µ´N¦³¤F....
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

¦^´_ 2# stillfish00


§Ú¹Á¸Õ¥Î²Ä2ºØ
¦ýÁÙ¬O¤£¦æ
¸ô®|¨ÌµM¨SÅÜ(ÁÙ¬O¦b¨t²Î¹w³]¸ô®|)
¦]¬°§Ú¤U­±ÁÙ¦³²o§è¨ì¶·­n±N¸Óµ§Àɮ׽ƻs¨ì¥t¤@¤u§@ªí

¦pªG¥Î²Ä1ºØ
¦ý«o¤£ª¾¹D¸Ó«ç»ò«Ø¥ß³s½uºÏºÐ¾÷

TOP

¦^´_ 1# t591nm
¦]¬°«e¤@¥yªº ChDrive ¬O¤Á´«µwºÐ¡A§Aµ¹¥¦ºô¸ô¤Wªº¹q¸£¡AµLªk¤Á´«¹L¥h
¤TºØ´À¥N¤è®×:
1. ¤â°Ê«Ø¥ß³s½uºÏºÐ¾÷ ¦p Z: ¹ïÀ³¨ì \\Domain\Woc\test
    µM«á§ï¦¨ChDrive "Z:"
    ¦AGetOpenFilename

2. §ï¥Î Application.FileDialog(msoFileDialogOpen)
    ³]©w¨ä InitialFileName ¬° "\\Domain\Woc\test"

3. ¥Î API
    Private Declare Function SetCurrentDirectory Lib "kernel32" _
    Alias "SetCurrentDirectoryA" (ByVal lpPathName As String) As Long
    ©I¥s
    SetCurrentDirectory "\\Domain\Woc\test"
    ¦AGetOpenFilename
ªí¹F¤£²M¡BÃD·N¤£©ú½T¡B¨SªþÀɮ׮榡¡B¨S¦³°Q½×°ÝÃDªººA«×~~~~~~¥H¤W·R²ö¯à§U¡C

TOP

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD