µù¥U
µn¿ý
º¶
½×¾Âª©³W
¸T¤î¦Cªí
»¡©ú
¦a¹Ï
¼Æ¦ì®Ñ»
¨p¤H®ø®§ (0)
¤½¦@®ø®§ (0)
½×¾Â¥ô°È (0)
¨t²Î®ø®§ (0)
¦n¤Í®ø®§ (0)
©«¤l®ø®§ (0)
³Â»¶®a±Ú°Q½×ª©ª©
»
Word
» VBA-¦ÛqCommandBarButton¨Æ¥ó (´¡¤J¦Û°Ê¹Ï¤å¶°)
ªð¦^¦Cªí
¤U¤@¥DÃD
¤W¤@¥DÃD
µo©«
[刦K]
VBA-¦ÛqCommandBarButton¨Æ¥ó (´¡¤J¦Û°Ê¹Ï¤å¶°)
°¶ÔÐ
µoµu®ø®§
¥[¬°¦n¤Í
°¶ÔÐ
(°¶ÔÐ)
·í«eÂ÷½u
UID
4
©«¤l
376
¥DÃD
84
ºëµØ
0
¿n¤À
419
ª÷¿ú
419
ÂI¦W
0
§@·~¨t²Î
Win 8
³nÅ骩¥»
Office 2007
¾\ŪÅv
100
©Ê§O
¤k
¦b½u®É¶¡
99 ¤p®É
µù¥U®É¶¡
2010-4-30
³Ì«áµn¿ý
2022-6-2
¡@¼ÊºÙ:
°¶ÔÐ
ª©¥D
©«¤l
376
¥DÃD
84
ºëµØ
0
¿n¤À
419
ÂI¦W
0
§@·~¨t²Î
Win 8
³nÅ骩¥»
Office 2007
¾\ŪÅv
100
©Ê§O
¤k
µù¥U®É¶¡
2010-4-30
³Ì«áµn¿ý
2022-6-2
1
#
¸õÂà¨ì
»
¥¿§Ç¬Ý©«
¥´¦L
¦rÅé¤j¤p:
t
T
µoªí©ó 2010-6-30 23:25
|
¥u¬Ý¸Ó§@ªÌ
[刦K]
VBA-¦ÛqCommandBarButton¨Æ¥ó (´¡¤J¦Û°Ê¹Ï¤å¶°)
VBA
,
¦Û°Ê¹Ï¤å¶°
ìµoªíªÌ¡Gleonchou (2005-05-28)
³o¦¸ªº»Ý¨D¬O¦Ûq¤@Ó¤U©Ô¦¡¥\¯àªí¡A¥[¤J¼ÆÓ«ö¶s¡F«ö¶sªº°Ê§@¬O¦b¤å¥ó¤¤´¡¤J¥H«ö¶s¦WºÙ¬°¦Wªº¦Û°Ê¹Ï¤å¶°¶µ¥Ø¡C
¥Ñ©ó CommandBarButtonªº OnAtion ¤£±µ¨ü±a°Ñ¼Æªº¥¨¶°¡A¤S¤£·Q«½Æ¼g¦hÓÃþ¦üªº¥¨¶°¡A©Ò¥H¦³¥H¤Uªº¸Ñ¨M¤è®×¡C
¨ä¹ê¦b«Ø¥ßCommandBarButton®Éª½±µ«ü©w爲¦Û°Ê¹Ï¤å¶°¶µ¥Ø¬O¥i¦æªº¡A¦ý¦pªG§A¯uªº¤£·Q¨º¼Ë°µ¡A¨º»ò¥H¤U¤¶²Ð¦Ûq CommandBarButton ªº Click ¨Æ¥ó¡G
1. ·s¼W¤@Óª«¥óÃþ§O¼Ò²Õ (¨Ï¥Î¹w³]¦WºÙClass1)¡A¥]§t¥H¤U¥N½X --
Public WithEvents cmdBarButton As Office.CommandBarButton
Private Sub cmdBarButton_Click(ByVal Ctrl As Office.CommandBarButton, _
¡@¡@CancelDefault As Boolean)
¡@¡@InsertAutoText Ctrl.Caption
¡@¡@CancelDefault = True
End Sub
½Æ»s¥N½X
2. «Ø¥ß¤U©Ô¦¡¥\¯àªí¥¨¶°©Ò¦b¼Ò²Õªºµ{¦¡½X --
Dim btnClass() As New Class1
Public Sub CreateCommandBarPopup()
¡@¡@Dim objCommandBarControl As Office.CommandBarControl
¡@¡@Dim objCommandBarButton As Office.CommandBarButton
¡@¡@
¡@¡@'§R°£ì¦³ªº¤U©Ô¦¡¥\¯àªí±±¨î¶µ
¡@¡@For Each objCommandBarControl In CommandBars("Standard").Controls
¡@¡@¡@¡@If objCommandBarControl.Caption = "§Úªº¥\¯àªí\" Then
¡@¡@¡@¡@¡@ objCommandBarControl.Delete
¡@¡@¡@¡@End If
¡@¡@Next objCommandBarControl
¡@¡@
¡@¡@'¦b"¤@¯ë"¤u¨ã¦C«Ø¥ß¤U©Ô¦¡¥\¯àªí¤Î«ö¶s
¡@¡@With CommandBars("Standard").Controls.Add(msoControlPopup)
¡@¡@¡@¡@.Caption = "§Úªº¥\¯àªí\\"
¡@¡@¡@¡@myCount = 0
¡@¡@¡@¡@For Each itm In Array("¼fp³æ¦ì", "«Ø³]³æ¦ì")
¡@¡@¡@¡@¡@¡@Set objCommandBarButton = .Controls.Add(msoControlButton)
¡@¡@¡@¡@¡@¡@With objCommandBarButton
¡@¡@¡@¡@¡@¡@¡@¡@.Caption = itm
¡@¡@¡@¡@¡@¡@¡@¡@.Tag = .Caption
¡@¡@¡@¡@¡@¡@End With
¡@¡@¡@¡@¡@¡@myCount = myCount + 1
¡@¡@¡@¡@¡@¡@ReDim Preserve btnClass(1 To myCount)
¡@¡@¡@¡@¡@¡@'±NCommandBarButton³v¤@³sµ²¨ì¤W±¦Û©w¸qªºcmdBarButtonª«¥ó
¡@¡@¡@¡@¡@¡@Set btnClass(myCount).cmdBarButton = objCommandBarButton
¡@¡@¡@¡@Next itm
¡@¡@End With
End Sub
Sub InsertAutoText(strAutoText As String)
' ¦b¥Ø«e¦ì¸m´¡¤J¦Û°Ê¹Ï¤å¶°
¡@¡@ActiveDocument.AttachedTemplate.AutoTextEntries(strAutoText).Insert Where:=Selection.Range
End Sub
½Æ»s¥N½X
¦p¦¹·í«ö¤U¦Û©w¸q¥\¯àªíªº«ö¶s´N·|IJµoª«¥óÃþ§O¼Ò²ÕClass1 ªºcmdBarButton_Click ¨Æ¥ó¡A¦Û°Ê§P§O¨ä Caption ÄݩʨéI¥s InsertAutoText µ{¦¡¡C
PS.
1. ¬ÛÃöªº¦Û°Ê¹Ï¤å¶°¶µ¥Ø¥²¶·¤w¦s¦b¡AY¨S¦³½Ð¥ý«Ø¥ß¡C
2. ¦b¤å¥ó¤¤´¡¤J¦Û°Ê¹Ï¤å¶°ªº¥N½X¤]¥i¥Hª½±µ¼g¦bÃþ¼Ò²Õ Class1 ªº cmdBarButton_Click ¨Æ¥ó¤§¤¤¡C
¼Ó¥D¼ö©«
¡uªÅ¥Õ¨¥÷ÃÒ¥¿¤Ï±¡v¦C¦L½d¥»
¦bWord¤¤³]©w¤½¦¡¹Bºâ
½Ð±ÐÃö©ó¦X¨Ö¦C¦L°ÝÃD
¦b PowerPoint¤º©ñ¸m/³sµ²excelÀÉ®×
±ÀÂË°¶ÔЪ©¥D·s§@«~¡m¥Ñ²L¤J²`§Ö¼Ö¾ÇExcel¨ç
±NWordÀÉ®×ÂনPPTÀÉ®×
¶±®Ø½uªº©³³¡¤£¨£¤F!?
½Ð±ÐÃö©óºI¨úÀx¦s®æ¤¤ªº°ß¤@È
¬°¤°»ò¤å¥ó¤º¦h¤F«Ü¦hªºÂŦ⩳½u?
§ó§ï§ë¼v¤ù¶½X¦ì¸m
¦¬ÂÃ
¤À¨É
°¶Ôйq¤l®Ñ,Åwªï§K¶O¤U¸ü°Ñ¦Ò
http://www.twbts.com/ebook/?subject=office
http://www.twbts.com/ebook/?subject=soft
°¶ÔÐÂîѮw---https://www.facebook.com/groups/669579416484096/
¦³¤@®a¬a¥J©±---https://www.facebook.com/sadodona
yangjie
µoµu®ø®§
¥[¬°¦n¤Í
yangjie
·í«eÂ÷½u
UID
1158
©«¤l
258
¥DÃD
77
ºëµØ
0
¿n¤À
385
ª÷¿ú
385
ÂI¦W
0
§@·~¨t²Î
Win7
³nÅ骩¥»
Office2010
¾\ŪÅv
20
©Ê§O
¨k
¨Ó¦Û
Taiwan
¦b½u®É¶¡
146 ¤p®É
µù¥U®É¶¡
2010-8-8
³Ì«áµn¿ý
2021-1-25
¤¤¾Ç¥Í
©«¤l
258
¥DÃD
77
ºëµØ
0
¿n¤À
385
ÂI¦W
0
§@·~¨t²Î
Win7
³nÅ骩¥»
Office2010
¾\ŪÅv
20
©Ê§O
¨k
¨Ó¦Û
Taiwan
µù¥U®É¶¡
2010-8-8
³Ì«áµn¿ý
2021-1-25
2
#
µoªí©ó 2014-1-19 14:01
|
¥u¬Ý¸Ó§@ªÌ
¦^´_
1#
°¶ÔÐ
¥i§_½Ð±Ðª©¥D¤j¤j
Excel VBA¸Ì
Path1 = Application.ActiveWorkbook.Path
¦bExcel VBA¸Ì À³¦p¦ó¼g»yªk ¥h¥´¶} path1 & "\A4_3x7.doc"
¸U¤À·P¿E
TOP
ÀR«ä¦Û¦b :
¦Û¤v®`¦Û¤v¡A²ö¹L©ó¶ÃµoµÊ®ð¡C
ªð¦^¦Cªí
¤U¤@¥DÃD
¤W¤@¥DÃD
EXCEL±MÄÝ°Q½×°Ï
Excel£¸¯ë°Ï
Excelµ{¦¡°Ï
¶i¶¥À³¥Î±M°Ï
OFFICE ¨t¦C
Word
PowerPoint
Access
Office¤£¤À°Ï
µ{¦¡»y¨¥
VB »P VB.Net
C »P C#
Java »P J#
µ{¦¡³]p¤£¤À°Ï
¸ê®Æ®w
ORACLE
My SQL
MS SQL
ºô¶³]p
ASP »P ASP.NET
PHP
PHP+MySQL ¤Jªù¹ê§@
JavaScript
FLASH / ActionScript
HTM/ HTML/ CSS
ºô¶³]p¤£¤À°Ï
¹q¸£»P§@·~¨t²Î
¹q¸£¦UºØµwÅé°Q½×
¤@¯ë¹q¸£³nÅé°Q½×
½×¾Â¨Æ°È
ºÞ²z¤½§i
§ë¶D¤Ï¬M
·s¤â´ú¸Õ
·R ¡E ¥Í¬¡
¤½¯q§G§iÄæ
¥Í¬¡»P·P°Ê
[¦¬Âæ¹¥DÃD]
[Ãöª`¦¹¥DÃDªº·s¦^´_]
[³q¹L QQ¡BMSN ¤À¨Éµ¹ªB¤Í]
¥Ó½Ð¤Í±¡Ãì±µ
Facebook¯»µ·