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

¦p¦ó¥Î¥¨¶°©I¥s¥¨¶°¡C

¦p¦ó¥Î¥¨¶°©I¥s¥¨¶°¡C

¦]¬°¦³®É¼¶¼g¥¨¶°¤ñ¸ûªø¡A·|·Q¤£¦Pªº¼Ò²Õ¼g¡C

¨Ò¦p·Q­n¥Î A¼Ò²Õ ©I¥s
B &¢Ñ¡@¼Ò²Õ°õ¦æ¦³µL¤°»ò¤èªk¡C
·íµM B& C ¤£·|¬O³o¼Ëµuªº¼Ò²Õ¡C

B¼Ò²Õ
Sub B01()
    Debug.Print ("This is B01")
End Sub

C¼Ò²Õ
Sub C01()
    Debug.Print ("This is C01")
End Sub

123.zip (6.9 KB)

¥»©«³Ì«á¥Ñ register313 ©ó 2012-3-2 23:08 ½s¿è

¦^´_ 1# Baracuda
  1. Sub main()

  2. Call B01

  3. Call C01

  4. End Sub
½Æ»s¥N½X

123.zip (8.46 KB)

TOP

¦^´_ 1# Baracuda
­«ÂI¬O¼Ò²Õ¦WºÙ¤£¯à»Pµ{§Ç¦WºÙ¬Û¦P
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

«e½ú­Ìªº¦^µª¡A¤Þ°_¤@¨Ç·sªº°ÝÃD¡C

¨Ò¦p¡G
1.¦pªG¦³¤@¨Ç±`¥Îªº¤½¥Îµ{¦¡¡A¦b B01 & C01 ³£¦³
Function Comm_Func01
Sub Common_01

¨º³o¼Ë·|¤£·|¦³°ÝÃD¡C

2. B01 & C01 ³£¦³¦P¼Ë¦WºÙªºµ{§Ç¦WºÙ®É¡A¦³¤°»ò¤èªk¥i¥H°µ©I¥s¤Wªº°Ï§O
¨Ò¦p¡G
Call B01.Process
Call C01.Process
µ¥¤èªk¡C

123.zip (8.59 KB)

TOP

¦^´_ 4# Baracuda
B01 & C01 ³£¦³¦P¼Ë¦WºÙªºµ{§Ç¦WºÙ®É¡A¦³¤°»ò¤èªk¥i¥H°µ©I¥s¤Wªº°Ï§O
¨Ò¦p¡G
Call B01.Process
Call C01.Process

¥G¥s¤£¦P±M®×ªºµ{§Ç  Run "123.XLS!A01.MAIN"

TOP

¦^´_ 4# Baracuda

1.¦pªG¦³¤@¨Ç±`¥Îªº¤½¥Îµ{¦¡¡A¦b B01 & C01 ³£¦³
Function Comm_Func01
Sub Common_01
¨º³o¼Ë·|¤£·|¦³°ÝÃD¡C

¤£·|¦³°ÝÃD
¦ý¬O¬JµM¬O¬Û¦P¦@¥ÎªºFunction,Sub,À³²Î¤@¸m©ñ©ó¤@­Ó¦@¥ÎªºModule,­n¥Î¨ìªºModule¦A©I¥s³o¦@¥ÎªºFunction,Sub

2. B01 & C01 ³£¦³¦P¼Ë¦WºÙªºµ{§Ç¦WºÙ®É¡A¦³¤°»ò¤èªk¥i¥H°µ©I¥s¤Wªº°Ï§O
¨Ò¦p¡G
Call B01.Process
Call C01.Process
µ¥¤èªk¡C

call Module¦WºÙ1.Sub¦WºÙ(©I¥s Module¦WºÙ1 ¤ºªº Sub¦WºÙ)
call Module¦WºÙ2.Sub¦WºÙ(©I¥s Module¦WºÙ2 ¤ºªº Sub¦WºÙ)
¥[¤WModule¦WºÙ,´N¥i¥H°Ï§O¤F

TOP

¦U¦ì«e軰ÁÂÁ¡C§Ú¸Õ¹L¬O¥i¥H°µªº¡C³o¨Ç¤èªk¤£¿ù¡C

TOP

¥»©«³Ì«á¥Ñ mark15jill ©ó 2012-3-14 08:56 ½s¿è

¦^´_ 7# Baracuda [code]Sub B01()
Sub A01()
    Application.Run "Book1!B01"    '°õ¦æ¼Ò²Õ1
    Application.Run "Book1!C01"    '°õ¦æ¼Ò²Õ1
End Sub


¾A¦X¥Î¨Ó°µ¦ê±µµ{¦¡

¦p¤@¬qµ{¦¡  SW1-100
¥i¥H¤À¦¨10¬q
SW1- SW10
SW11-SW20  ¥H¦¹Ãþ±À

TOP

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