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

module ªº¦ì¸m?

module ªº¦ì¸m?

¦U¦ì¤j¤j¦n ¤p§Ì¥Ø«e¹J¨ì¤@­Ó°ÝÃD
§Ú¦³5­ÓÀÉ®× Àɮפºªºmodule³£¬O¤@¼Ëªº §Ú¤À§O§â¥¦­Ì¼g¦b¨C­ÓÀɮתº¤@¯ë¼Ò²Õ¤º
¨C¦¸­n°õ¨ä¤¤¤@­Ó¥¨¶° ³£¥²¶·§â¨º­ÓÀɮ׶}±Ò¤~¯à°õ¦æ
­n«ç¼Ë¥u­n¼g¤@­Ómodule´N¥i¥H±±¨î³o¨Ç¤w¶}±ÒªºÀÉ®×

ex:
a¥¨¶°--->°õ¦æAÀÉ®×
b¥¨¶°--->°õ¦æBÀÉ®×
c¥¨¶°--->°õ¦æCÀÉ®×
d¥¨¶°--->°õ¦æDÀÉ®×
e¥¨¶°--->°õ¦æEÀÉ®×

¦@¥Îmodule--->¤À§O°õ¦æA¡BB¡BC¡BD¡BEÀÉ®×?

1­Ó¥¨¶°¥i¥H¾Þ±±¦h­ÓÀÉ®×, µø¥G·Q«ç¼Ë¾Þ§@

¥H¤U¬O§âWORKBOOK C²Ä1­¶A1®æªºªF¦è©ñ¨ìWORKBOOK B²Ä1­¶A1®æ
set wb_b= WORKBOOKS.OPEN("B.XLS")
set wb_C= WORKBOOKS.OPEN("C.XLS")
wb_b.sheets(1).range("A1") = wb_c.sheets(1).range("A1")

¥t¥~,§â¥N½X©ñ¨ìTHISWORKBOOK¤º,

¨ä¥LWORKBOOK ´N¥i¥H³o¼Ë¹B¦æ:
Sub test()
    Set wbtest = Workbooks.Open("C:\temp\·s¼W¸ê®Æ§¨\test.xlsm")
    Call wbtest.test
End Sub
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

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

TOP

¦^´_ 1# alex520188
¬O³o¼Ë¶Ü?
  1. Sub Ex()
  2.     Dim FileName As String, FilePath As String
  3.         FileName = Range("A1")          'ÀɮצWºÙ
  4.         FilePath = "D:\"                '¸ô®|
  5.         Workbooks.Open FilePath & FileName
  6.         Run FileName & "!TEST"          '¨C¤@Àɮ׶·¬O¤@¼Ëªº¥¨¶°¦WºÙ
  7. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ HUNGCHILIN ©ó 2011-11-26 14:47 ½s¿è

³o¼ËªºÀÉ¡A§@¦¨¼W¯q¶°©Î³\·|¤ñ¸û¦n
¦³¿³½ì¥i¦h·j´M¼W¯q¶°(¤j³°¥s"¥[¸ü§»")§@ªk
http://www.officefans.net/cdb/viewthread.php?tid=75091&highlight=

TOP

        ÀR«ä¦Û¦b : ¯à·F¤£·F¡A¤£¦p­W·F¹ê·F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD