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

[¤À¨É] VBA ¾ã­Ó¼Ò²ÕSUBªº«O±K

[¤À¨É] VBA ¾ã­Ó¼Ò²ÕSUBªº«O±K

¥»©«³Ì«á¥Ñ HUNGCHILIN ©ó 2012-1-7 15:53 ½s¿è

³o¬O¤@­ÓÆ[©À©Êªº°ÝÃD
¾ã­ÓModule¤ºªº¬O¥i¥H§@«O±K°Ê§@ªº
§@ªk¬O±NModule ¤º¥[¤WOption Private Module
¦Ó¤£¥Î¤@­Ó¤@­Ó±Nsub§ï¬°private sub µM«á±M®×¥[±K
---------------------------------------------------------------------------------------------------
¥D­nªí¹F®ÄªG
private sub ¸ò¤@¯ëSUB¦b¶}±ÒªºVBEµøµ¡¼Ò²Õ¤¤ÁÙ¬O¬Ýªº¨ì§äªº¨ìªº
¥D­n®t²§¬Osub ¦b¤u¨ã/¥¨¶°/¥¨¶°°õ¦æµøµ¡¤¤ ¬Ýªº¨ì¤]¿ïªº¨ì
private sub¦b¥¨¶°°õ¦æµøµ¡¤¤ ¬Ý¤£¨ì¤]¿ï¤£¨ì¥u¯à¦Û¤v¿é¤J

±M®×³QÂê©w¤Uprivate sub­Y¨S¦³¥Î"¯S»sµ{¦¡Åª¥X¦WºÙ"°ò¥»¤W¬Ý¤£¨ìªº
³q±`­n¶}±Ò±M®×¤~¯à¬Ý¨ìprivate sub

¤W­z­n¤@­Ó¤@­ÓSUB «e­±¥[¤Wprivate¡A³o­Ó¥u­n¦b¼Ò²Õ¶}ÀY®a¥[¤W Option Private Module
¾ã­Ó¼Ò²Õ´N·|Åܦ¨¨p¥Î¼Ò²Õ

---------------------------------------------------------------------------------------------------
  1. Option Private Module '¾ã­Ó¼Ò²Õ¬°¨p¥Î¼Ò²Õ¡A¤£·|¥X²{¦b¥¨¶°°õ¦æµøµ¡
  2. Option Explicit
  3. Sub OptionExplicit1()

  4. 'Dim num As String

  5.     num = "Option Explicit"
  6.     MsgBox num

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

        ÀR«ä¦Û¦b : ¡i®É¶¡µLªk¾B¾×¡j©È®É¶¡®ø³u¡Aªá¤F³\¦h¤ß¦å¡A·QºÉ¦U¦¡¤èªk­n¾B¾×®É¶¡¡Aµ²ªG¬O¡G®ö¶O¤F§ó¦h®É¶¡¡A¥B¤@µL©Ò¦¨¡I
ªð¦^¦Cªí ¤W¤@¥DÃD