- ©«¤l
- 4901
- ¥DÃD
- 44
- ºëµØ
- 24
- ¿n¤À
- 4916
- ÂI¦W
- 255
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Office 20xx
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥x¥_
- µù¥U®É¶¡
- 2010-4-30
- ³Ì«áµn¿ý
- 2024-11-25
|
¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-2-12 22:14 ½s¿è
¦^´_ 5# cr123a
§A¬OÀx¦s¦¨¼W¯q¶°¡A¨º»ò¥²¶·¨Ï¥Îª«¥óÃþ§O¼Ò²Õ¡AÅý¶}Àɰʧ@¯à¥[¤J»¡©ú
ª«¥óÃþ§O¼Ò²Õ- Public WithEvents App As Application
- Private Sub App_NewWorkbook(ByVal Wb As Workbook)
- Get_Macro
- End Sub
- Private Sub App_WorkbookOpen(ByVal Wb As Workbook)
- Get_Macro
- End Sub
½Æ»s¥N½X
¤@¯ë¼Ò²Õ- Public xlApp As New Class1 '«Å§i xlApp ¬°¤W±¦Ûqªºª«¥ó¼Ò²Õ
- Sub Auto_Open() 'Auto_Open·|¦b¦¹Àɶ}±Ò®É¦Û°Ê°õ¦æ
- Set xlApp.App = Application
- '§â¦Ûq¼Ò²Õªº App ³]¬°(¤]¥i»¡³sµ²¨ì)Applicationª«¥ó
- End Sub
- Sub Get_Macro()
- Dim cMdl As Object, Ay$, Ay1$, MyName, i&, k%
- Set cMdl = ThisWorkbook.VBProject.VBComponents("Module1").CodeModule '¨ç¼Æ©Ò¦b¦ì¸m
- i = cMdl.CountOfLines
- ar = Split(cMdl.Lines(1, i), Chr(10))
- For i = 0 To UBound(ar)
- If ar(i) <> "" And ar(i) Like "Function *" Then
- n = InStr(ar(i), " ")
- k = InStr(Split(ar(i), " ")(1), "(")
- MyStr = Mid(ar(i), n + 1, k - 1)
- If Ay = "" Then
- Ay = MyStr
- Else
- Ay = Ay & Chr(10) & MyStr
- End If
- End If
- If ar(i) <> "" And InStr(ar(i), "»¡©ú") > 0 Then
- If Ay1 = "" Then
- Ay1 = Replace(ar(i), "'", "")
- Else
- Ay1 = Ay1 & Chr(10) & Replace(ar(i), "'", "")
- End If
- End If
- Next
- MyName = Split(Ay, Chr(10))
- MyStr = Split(Ay1, Chr(10))
- For i = 0 To UBound(MyName)
- Application.MacroOptions macro:=MyName(i), Category:=10, Description:=MyStr(i)
- Next
- End Sub
- '¥H¤U¬°§A쥻¦Ûq¨ç¼Æµ{¦¡
- Function pkaJPreMath(A)
- '»¡©ú:pka20120211 ¨C¤@¦r¦ê¥[¤W²Å¸¹
- pkaJPreMath = "$ " & A & " $ "
- End Function
- Function pkaJPreAddBam03(intA, IntB, A)
- '»¡©ú:pka20120211 ¨C¤@¦r¦ê¥[¤W ¬A¸¹ ¤j ¤¤ ¤p
- If intA = 0 Then '¤£¥[§P§Oª½±µ¥[
- If IntB = 1 Then
- pkaJPreAddBam03 = "( " & A & " ) "
- ElseIf IntB = 2 Then
- pkaJPreAddBam03 = "[ " & A & " ] "
- ElseIf IntB = 3 Then
- pkaJPreAddBam03 = "{ " & A & " } "
- End If
- ElseIf intA = 1 Then 'A¬°tȤ~¥[¬A¸¹
- If IntB = 1 And Mid(A, 1, 1) = "-" Then
- pkaJPreAddBam03 = "( " & A & " ) "
- ElseIf IntB = 2 And Mid(A, 1, 1) = "-" Then
- pkaJPreAddBam03 = "[ " & A & " ] "
- ElseIf IntB = 3 And Mid(A, 1, 1) = "-" Then
- pkaJPreAddBam03 = "{ " & A & " } "
- Else
- pkaJPreAddBam03 = A
- End If
- End If
- End Function
½Æ»s¥N½X
¸ü¤J¦¹¼W¯q¶°«á¡A¶}·sÀɮשζ}±ÒÂÂÀÉ«á¨ç¼ÆÃþ§O·|¦h¥X¤@Ó"©R¥O"Ãþ§O
¦¹³Bªº¨ç¼Æ´N¦³»¡©ú¤F
|
|