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

[µo°Ý] ¦p¦ó§â¬¡­¶Ã¯¦WºÙ«ü©w ¦b­þ­ÓÄæ¦ì (¤wª¦¤å¦h¤é¡^

[µo°Ý] ¦p¦ó§â¬¡­¶Ã¯¦WºÙ«ü©w ¦b­þ­ÓÄæ¦ì (¤wª¦¤å¦h¤é¡^

§Ú¦³¦h­ÓVBAÀÉ
¸Ì­±³£¦³¨Ç­n«ü©w¬¡­¶Ã¯¦W¤lªº
¨Ò¦p
    Workbooks.Open Filename:="G:\¨C¤ë¤é³øªí\2012.11\101-11¤é³øªí.xlsm"
    Workbooks("1113¤é³øªí¦Û°Êºâ(ºî¦X).xlsm").Activate
¨C­Ó¤ë³£·|ÅÜ  ³o¼Ë§Ú¦³¿ìªk§â  G:\¨C¤ë¤é³øªí\2012.11\101-11¤é³øªí.xlsm   ¿é¤J¦Ü sheets("³]©w°Ï").range("A2")
µM«á¥H«á§Ú´N§ïA2ªºÄæ¦ì¸Ì­±ªº¦r¤¸¶Ü
§Ú«Å§i¦¨ workbooks ¤]³£¸Õ¹L ³£¤£¦æ.....¨ì³Bª¦¤å³£¨S¦³¤H¦³³o­Ó°ÝÃD....
¨S¿ìªk¥u¦n¦V¦U¦ì¤j¤j«ü¾É¤F.....

§Úªº¥N½X¦p¤U

sub ¤é³øªí°»´ú()

'°»´ú¥H¤U¬¡­¶Ã¯¬O§_¶}±Ò
bookname = "101-11¤é³øªí.xlsm"
For Each wbs In Workbooks
    If UCase(wbs.Name) = UCase(bookname) Then
        MsgBox bookname & " ¤w¶}±Ò¡A±N¦Û°ÊÀx¦sÃö³¬"
        Workbooks("101-11¤é³øªí.xlsm").Activate '¤Á´«¬¡­¶Ã¯
        ActiveWorkbook.Save 'Àx¦s¥Ø«e¨Ï¥Îªº¬¡­¶Ã¯
        ActiveWorkbook.Close  'Ãö³¬¬¡­¶Ã¯
        Exit For
    End If
Next wbs
end sub

¦^´_ 1# die78325
¬O³o¼Ë¶Ü?
  1. Sub Ex()
  2.     With Workbooks.Open(Filename:="G:\¨C¤ë¤é³øªí\2012.11\101-11¤é³øªí.xlsm")
  3.         Workbooks("1113¤é³øªí¦Û°Êºâ(ºî¦X).xlsm").Sheets("³]©w°Ï").Range("A2") = .Name
  4.     End With
  5. End Sub
½Æ»s¥N½X

TOP

¤j¤j ©êºp ¥i¯à¬O§ÚÁ¿ªº¤£¬O«Ü²M·¡....
§Ú§Æ±æªº¬O ¥i¤£¥i¥H§â §ÚªºÀɮצW¤l
101-11¤é³øªí.xlsm   ©Î  G:\¨C¤ë¤é³øªí\2012.11\101-11¤é³øªí.xlsm
©ñ¤JÀx¦s®æ    µM«á§Q¥Î Àx¦s®æ   ¨Ò¦p   ramge("A2") ¨Ó´À¥NÀɮצW
¤£µM§Ú¨C­Ó¤ë³£­n¶i¥h­×§ïÀɦW....... ²{¦b¬O¤£¦h ¦ý¤§«á¥i¯à«Ü¦h³oºØª¬ªp@@" ·Q¥ý§JªA³o­Ó³¡¤À
§Ú°Ñ¦Ò¤@°ï¤å ®Ú½d¨Ò¤å  ³£¥u¦³±NÀx¦s®æ¤ºªº­È´À¥N§OºØªF¦è ´N¬O¨S¦³¤H´À¥NÀɮצW©Î¸ô®|ªº.....


§Ú¸ÕµÛ«Å§i dim dd as workbooks
dd=sheets("ºô­¶°Ï").range("A2")   
µM«á§âG:\¨C¤ë¤é³øªí\2012.11\101-11¤é³øªí.xlsm ¶K¤JA2



³o¼Ë¤]¤£¥i¦æ.....  ©Ò¥H §Ú¤£À´¸Ó«ç»ò¨Ó¥h³]©wÀx¦s®æ¸Ì­±ªº¬OÀɦW
¦]¬°©È¥H«á±bµ¹§O¤H°µ ¥L·|¤£ª¾¹D«ç»ò¶i¥h§ï¸ô®|©ÎÀɮצW §Æ±æ¯à¦bÀx¦s®æ¸Ì­±°µ­×§ï
·PÁ¤j¤j¼ö¤ß¦^À³§Ú~~

TOP

¦^´_ 2# GBKEE

©êºp­è¨SÂI¦^À³......¸Éµo¤@©«   ¦p¦³¹L¥¢½Ð¤j¤j¨£½Ì!


¤j¤j ©êºp ¥i¯à¬O§ÚÁ¿ªº¤£¬O«Ü²M·¡....
§Ú§Æ±æªº¬O ¥i¤£¥i¥H§â §ÚªºÀɮצW¤l
101-11¤é³øªí.xlsm   ©Î  G:\¨C¤ë¤é³øªí\2012.11\101-11¤é³øªí.xlsm
©ñ¤JÀx¦s®æ    µM«á§Q¥Î Àx¦s®æ   ¨Ò¦p   ramge("A2") ¨Ó´À¥NÀɮצW
¤£µM§Ú¨C­Ó¤ë³£­n¶i¥h­×§ïÀɦW....... ²{¦b¬O¤£¦h ¦ý¤§«á¥i¯à«Ü¦h³oºØª¬ªp@@" ·Q¥ý§JªA³o­Ó³¡¤À
§Ú°Ñ¦Ò¤@°ï¤å ®Ú½d¨Ò¤å  ³£¥u¦³±NÀx¦s®æ¤ºªº­È´À¥N§OºØªF¦è ´N¬O¨S¦³¤H´À¥NÀɮצW©Î¸ô®|ªº.....


§Ú¸ÕµÛ«Å§i dim dd as workbooks
dd=sheets("ºô­¶°Ï").range("A2")   
µM«á§âG:\¨C¤ë¤é³øªí\2012.11\101-11¤é³øªí.xlsm ¶K¤JA2


³o¼Ë¤]¤£¥i¦æ.....  ©Ò¥H §Ú¤£À´¸Ó«ç»ò¨Ó¥h³]©wÀx¦s®æ¸Ì­±ªº¬OÀɦW
¦]¬°©È¥H«á±bµ¹§O¤H°µ ¥L·|¤£ª¾¹D«ç»ò¶i¥h§ï¸ô®|©ÎÀɮצW §Æ±æ¯à¦bÀx¦s®æ¸Ì­±°µ­×§ï
·PÁ¤j¤j¼ö¤ß¦^À³§Ú~~!!!

TOP

¦^´_ 4# die78325
­n¦h¬Ý¬Ý VBA ªº»¡©ú
§Ú¸ÕµÛ«Å§i dim dd as workbooks
    Workbooks ÄÝ©Ê ©w¶Ç¦^ Workbooks ¶°¦X¡A¦¹¶°¦X¥Nªí©Ò¦³¶}±Òªº¬¡­¶Ã¯¡C°ßŪ¡C
    Workbook ª«¥ó ¥Nªí Microsoft Excel ¬¡­¶Ã¯¡C
    Workbook ª«¥ó¬O Workbooks ¶°¦Xªº¦¨­û¡CWorkbooks ¶°¦X¥]§t¥Ø«e Microsoft Excel ¤¤©Ò¦³¶}±Òªº Workbook ª«¥ó¡C
  
  1. Option Explicit
  2. Sub EX()   
  3.     Dim dd As String '¦r¦ê«¬ºA
  4.     dd = Sheets("ºô­¶°Ï").Range("A2")
  5.     Workbooks.Open (dd)
  6. End Sub
½Æ»s¥N½X

TOP

¦n±jªü §Ú¤§«e¤]¦³¥Î³o­Ó¦r¦ê¨Ó«Å§i
¦ý...§Ú¦³¥´ ("XX")  
²{¦b¸Õ¤F¤@¤U  ¤£­n¥´ " " ´N¥i¥H°õ¦æ¤F~~~

·PÁ¤j¤j~~~~¤SÅý§Ú¾Ç¤F¤@½Ò!!

TOP

        ÀR«ä¦Û¦b : ®É®É¦n¤ß´N¬O®É®É¦n¤é¡C
ªð¦^¦Cªí ¤W¤@¥DÃD