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

ªO¤j¤£¦n·N«ä ¤S¹J¨ì°ÝÃD¤F ¦p¦ó¥ÎÀɦW«Ø¥ß·sªº¸ê®Æ§¨?

ªO¤j¤£¦n·N«ä ¤S¹J¨ì°ÝÃD¤F ¦p¦ó¥ÎÀɦW«Ø¥ß·sªº¸ê®Æ§¨?

¤§«e«ÜÁÂÁ¦U¦ìªºÀ°¦£ ¤p§ÌÀò¯q¨}¦h

³Ìªñ¹J¨ì¤@­Ó°ÝÃD  §xÂZ«Ü¤[

·í§Ú¨Ï¥Î¥H¤U«ü¥O Åý¨Ï¥ÎªÌ¥i¥H¶}±ÒÀɮתº®É­Ô

myfile = workbook.application.getopenfilename ("excel¤å¥ó(*.xls),*.xls")
With Workbooks.Open(myfile)

(°²³]¶}±ÒªºÀɮ׬OC:\test\demo1.xls,(path¤£·|©T©w) ©Ò¥H myfile ¥Îmsgbox¬Ý¨ìªº·|µ¥©ó C:\test\demo1.xls )

³oÃä§Æ±æ¯à°÷¦bC:\ «Ø¥ß¤@­ÓFolder ¥s°µ demo1

·í¨Ï¥ÎªÌ¶}¤°»òÀÉ®× ´N¨Ì·Ó¥LÀɮתº¦WºÙ ¶}¤@­Ófolder¦bc:\

³Ì«á¦A§â§Ú¤@­Ó¤w¸g¦³ªºÀÉ®× ³oÃä°²³]¥s°µtemp.xls    ¦s¨ì³o·s«Ø¥ßªºdemo1 folder¸Ì­±

§Úª¾¹D«Øfolderªº«ü¥O¬O mkdir()

¦ý¬O¤£ª¾¹D «ç»ò§âdemo1µ¹§ì¥X¨Ó

·Ð½Ð¦U¦ì°ª¤â «ü¾É¤@¤U ¤p§Ì «D±`·P¿E

TEMP.XLS ¬O§_¤w¥´¶}ÀÉ®×?
¬Oªº¸Ü:
1. Àˬd¦³¨S¦³DEMO FOLDER,¨Sªº¸Ü´N«Ø
Dim fso
CreateObject("Scripting.FileSystemObject")
If not(fso.FolderExists("C:\demo")) Then
   MkDir ("C:\demo")
end if

2.§âWORKBOOK©ñ¤W¥h
WORKBOOKS("TEMP").saveas("c:\demo\temp.xls")
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

©êºp  §Úªº·N«ä¬O
""·í¨Ï¥ÎªÌ¶}¤°»òÀÉ®× ´N¨Ì·Ó¥LÀɮתº¦WºÙ ¶}¤@­Ófolder¦bc:\""
°²³]¶}ªºÀÉ®×¥s°µxxx.xls ,´N¦bc:\¤U«Ø¥ß¤@­Óxxx folder ¥H¦¹Ãþ±À
¤§«á¦sÀÉ®×(°²³]¥s°µtemp.xls,¬O§Úµ{¦¡¸Ì²£¥Í¥X¨Óªº,¨S¦³¥´¶}ªº) ¬O§Æ±æ¯à°÷¦s¨ì³o­Ófolder(xxx)
¦ý¬O§Ú¤£ª¾¹D­n«ç»ò§ì¨ì¥LªºÀɦW ,
³o¼Ë¸ÑÄÀ¥i¥H²z¸Ñ¶Ü?

TOP

        ÀR«ä¦Û¦b : ·R¤£¬O­n¨D¹ï¤è¡A¦Ó¬O­n¥Ñ¦Û¨­ªº¥I¥X¡C
ªð¦^¦Cªí ¤W¤@¥DÃD