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

[µo°Ý] ½Ð°Ý vba ¦Û»s¨ç¼Æ ¦p¦ó¦C¥X¨Ó

[µo°Ý] ½Ð°Ý vba ¦Û»s¨ç¼Æ ¦p¦ó¦C¥X¨Ó

½Ð°Ý¤j®a  
vba ¦Û»s¨ç¼Æ¤Ó¦h°O¤£¦í
¦³¨S¦³¿ìªk §â¦Û»sªº¨ç¼Æ¦WºÙ  ¥þ³¡¦C¥X¨ì¤@­ÓÀÉ®×????

ÁÂÁÂ

§Ú¤F¸Ñ¤F
ÁÂÁ±zªº«Ø¨¥
§Ú·íºÜ¤O¥h²z¸Ñ!
ÁÂÁÂ!

TOP

¦^´_ 7# cr123a


    °Q½×°Ï¤£¬O¨DÀÉ°Ï
¹ï©ó¦^´_ªº¤º®eÀ³¸ÓºÉ¤O¥h²z¸Ñ
Âà¤Æ¦¨¦Û¤vªºª¾ÃÑ
­Y¨C¦¸¥u¬O·Q±o¨ì¸Ñµª´N¦n
¨º´N¤£¥s°Q½×¤F
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 6# Hsieh


    ¯«¯«¯«  ¼F®`!ÁÂÁ±z¤F

¸Õ¤F¦n¤[ ²×©ó¸Õ¥X¨Ó¤F(¸ê½è·M¶w)
¹ï¤j¤j¦n¹³«Ü®e©ö  ¦ý²×©ó¸Õ¥X¨Ó¤F!

¹ï©ó¤W­±ªºµ{¦¡½X §Ú¬O¤@µL©Òª¾  
»Ý¤£»Ý­n¥h¾Ç²ß¥¦??
ÁÙ¬O¹J¨ì°ÝÃD¦A´M°Ý©O?

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-2-12 22:14 ½s¿è

¦^´_ 5# cr123a

§A¬OÀx¦s¦¨¼W¯q¶°¡A¨º»ò¥²¶·¨Ï¥Îª«¥óÃþ§O¼Ò²Õ¡AÅý¶}Àɰʧ@¯à¥[¤J»¡©ú
ª«¥óÃþ§O¼Ò²Õ
  1. Public WithEvents App As Application
  2. Private Sub App_NewWorkbook(ByVal Wb As Workbook)
  3. Get_Macro
  4. End Sub

  5. Private Sub App_WorkbookOpen(ByVal Wb As Workbook)
  6. Get_Macro
  7. End Sub
½Æ»s¥N½X

¤@¯ë¼Ò²Õ
  1. Public xlApp As New Class1 '«Å§i xlApp ¬°¤W­±¦Û­qªºª«¥ó¼Ò²Õ

  2. Sub Auto_Open() 'Auto_Open·|¦b¦¹Àɶ}±Ò®É¦Û°Ê°õ¦æ
  3.     Set xlApp.App = Application
  4.     '§â¦Û­q¼Ò²Õªº App ³]¬°(¤]¥i»¡³sµ²¨ì)Applicationª«¥ó
  5. End Sub

  6. Sub Get_Macro()
  7. Dim cMdl As Object, Ay$, Ay1$, MyName, i&, k%
  8. Set cMdl = ThisWorkbook.VBProject.VBComponents("Module1").CodeModule '¨ç¼Æ©Ò¦b¦ì¸m
  9. i = cMdl.CountOfLines
  10.    ar = Split(cMdl.Lines(1, i), Chr(10))
  11.    For i = 0 To UBound(ar)
  12.       If ar(i) <> "" And ar(i) Like "Function *" Then
  13.       n = InStr(ar(i), " ")
  14.       k = InStr(Split(ar(i), " ")(1), "(")
  15.       MyStr = Mid(ar(i), n + 1, k - 1)
  16.          If Ay = "" Then
  17.             Ay = MyStr
  18.          Else
  19.             Ay = Ay & Chr(10) & MyStr
  20.          End If
  21.        End If
  22.       If ar(i) <> "" And InStr(ar(i), "»¡©ú") > 0 Then
  23.          If Ay1 = "" Then
  24.             Ay1 = Replace(ar(i), "'", "")
  25.          Else
  26.             Ay1 = Ay1 & Chr(10) & Replace(ar(i), "'", "")
  27.          End If
  28.       End If
  29.    Next
  30.   MyName = Split(Ay, Chr(10))
  31.   MyStr = Split(Ay1, Chr(10))
  32.   For i = 0 To UBound(MyName)
  33.      Application.MacroOptions macro:=MyName(i), Category:=10, Description:=MyStr(i)
  34.   Next
  35. End Sub

  36. '¥H¤U¬°§A­ì¥»¦Û­q¨ç¼Æµ{¦¡
  37. Function pkaJPreMath(A)
  38. '»¡©ú:pka20120211 ¨C¤@¦r¦ê¥[¤W²Å¸¹
  39.   pkaJPreMath = "$ " & A & " $ "
  40. End Function

  41. Function pkaJPreAddBam03(intA, IntB, A)
  42. '»¡©ú:pka20120211 ¨C¤@¦r¦ê¥[¤W ¬A¸¹ ¤j ¤¤ ¤p
  43.     If intA = 0 Then '¤£¥[§P§Oª½±µ¥[
  44.        If IntB = 1 Then
  45.            pkaJPreAddBam03 = "( " & A & " ) "
  46.         ElseIf IntB = 2 Then
  47.            pkaJPreAddBam03 = "[ " & A & " ] "
  48.         ElseIf IntB = 3 Then
  49.            pkaJPreAddBam03 = "{ " & A & " } "
  50.        End If
  51.     ElseIf intA = 1 Then 'A¬°­t­È¤~¥[¬A¸¹
  52.        If IntB = 1 And Mid(A, 1, 1) = "-" Then
  53.            pkaJPreAddBam03 = "( " & A & " ) "
  54.         ElseIf IntB = 2 And Mid(A, 1, 1) = "-" Then
  55.            pkaJPreAddBam03 = "[ " & A & " ] "
  56.         ElseIf IntB = 3 And Mid(A, 1, 1) = "-" Then
  57.            pkaJPreAddBam03 = "{ " & A & " } "
  58.         Else
  59.            pkaJPreAddBam03 = A
  60.         End If
  61.     End If
  62. End Function
½Æ»s¥N½X

¸ü¤J¦¹¼W¯q¶°«á¡A¶}·sÀɮשζ}±ÒÂÂÀÉ«á¨ç¼ÆÃþ§O·|¦h¥X¤@­Ó"©R¥O"Ãþ§O
¦¹³Bªº¨ç¼Æ´N¦³»¡©ú¤F
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 4# Hsieh


    ¤£¬O¬°¤F«O±K   
¦Ó¬O¤@¶}©l¥Ç¤F¤@­Ó­P©Rªº¿ù------¤@¶}©l¨Ï¥Î¦Û»s·s¨ç¼Æ «Ü¼ô   ¤]»{¬°¨S¥²­n¥[µù©ú  
¦ý¤[¦Ó¤[¤§  ¶q¤j®É  «Ü¦h¨ç¼Æ¤£¦A±`¥Î  ´N¶}©l¿ò§Ñ ¦A¥[¤W¹q¸£±`¥X°ÝÃDªº±¡ªp¤U  
´N§Ñ¤F¤§«eªº³]©w ....................

¯u¬OÁÂÁ±z  ±z¦Ü¤Öµ¹¤F§Ú ¤@­Ó¦n¤è¦V

¦ý§ÚÁÙ¬O¨S¸Õ¥X¨Ó         pk20120209³Ì·sµ{¦¡.rar (32.76 KB)

TOP

¦^´_ 3# cr123a

°ò¥»¤W¦b¼¶¼g¦Û­q¨ç¼Æ¦P®É¡A´N§â¨ç¼Æ¨Ï¥Î»¡©ú¼g¦bµ{¦¡½X¤¤¤ñ¸û¦X¾A
¥i¯à§A­n«O±K§Aªºµ{¦¡½X¡A¨º»ò¡A¥u»Ý¦b¶}±Ò¦¹Àɮ׮ɡA©ó´¡¤J¨ç¼Æ¹ï¸Ü®Ø¤¤¥[¤J³o¨Ç¦r¦ê§Y¥i
Á|¨Ò¨Ó»¡¦Û­q¨ç¼Æ³£¶°¤¤¦bModule1
¦p¹Ï

¥H¤W¹Ï¤¤ªº¼Ë¦¡¥[¤J»¡©ú¤å¦r
¦bThisworkbook¼Ò²Õ¤º¿é¤J
  1. Private Sub Workbook_Open()
  2. Dim cMdl As Object, Ay$, Ay1$, MyName
  3. Set cMdl = ThisWorkbook.VBProject.VBComponents("Module1").CodeModule '¨ç¼Æ©Ò¦b¦ì¸m
  4. i = cMdl.CountOfLines
  5.    ar = Split(cMdl.Lines(1, i), Chr(10))
  6.    For i = 0 To UBound(ar)
  7.       If ar(i) <> "" And ar(i) Like "Function *" Then
  8.       n = InStr(ar(i), " ")
  9.       k = InStr(Split(ar(i), " ")(1), "(")
  10.       MyStr = Mid(ar(i), n + 1, k - 1)
  11.          If Ay = "" Then
  12.             Ay = MyStr
  13.          Else
  14.             Ay = Ay & Chr(10) & MyStr
  15.          End If
  16.        End If
  17.       If ar(i) <> "" And InStr(ar(i), "»¡©ú") > 0 Then
  18.          If Ay1 = "" Then
  19.             Ay1 = Replace(ar(i), "'", "")
  20.          Else
  21.             Ay1 = Ay1 & Chr(10) & Replace(ar(i), "'", "")
  22.          End If
  23.       End If
  24.    Next
  25.   MyName = Split(Ay, Chr(10))
  26.   MyStr = Split(Ay1, Chr(10))
  27.   For i = 0 To UBound(MyName)
  28.      Application.MacroOptions macro:=MyName(i), Category:=10, Description:=MyStr(i)
  29.   Next
  30. End Sub
½Æ»s¥N½X
©ó´¡¤J¨ç¼Æ®É§Y¥i¥X²{»¡©ú¤å¦r(¦p¤U¹Ï)
  
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh


  ÁÂÁ±z

¦ý¬O «Ü¦h¦Û»s¨ç¼Æ ¤é¤l¤[¤F´N§Ñ¤F«ç»ò¥Î ¥Îªk¦p¦ó??
§Ú¬O·Q §â¨ç¼Æ¦W¶×¥X¨ì¤@­ÓÀÉ®×  ¦A¥´¤W¥Îªk ¦A¦L¥X
¥H¨Ï¤é«á ¬d´M¨Ï¥Î¤W¤è«K

TOP

¦^´_ 1# cr123a
¨S¥²­n³o»ò³Â·Ð§a!
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¡i°µ¤Hªº¶}©l¡j¨C¤@¤Ñ³£¬O¬G¤Hªº¶}©l¡A¨C¤@­Ó®É¨è³£¬O¦Û¤vªºÄµ±§¡C
ªð¦^¦Cªí ¤W¤@¥DÃD