- ©«¤l
- 561
- ¥DÃD
- 160
- ºëµØ
- 0
- ¿n¤À
- 725
- ÂI¦W
- 0
- §@·~¨t²Î
- WINDOWS
- ³nÅ骩¥»
- xp
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2014-9-10
- ³Ì«áµn¿ý
- 2024-8-7
|
DEAR SIR
¤§«e¬ãŪ«e½ú¤§¤j§@ ¤Þ¥Î»¡©ú¦p¤U
1.¥ý§ì ID
Sub Id()
Sheet1.[A1:IV65536].ClearContents
For Each cmd In CommandBars
Cells(i + j + 2, 1) = cmd.Index
Cells(i + j + 2, 2) = cmd.Name
Cells(i + j + 2, 3) = cmd.Position
Cells(i + j + 2, 4) = cmd.Type
For Each ctl In CommandBars(cmd.Name).Controls
Cells(i + j + 2, 5) = ctl.Id
Cells(i + j + 2, 6) = ctl.Caption
j = j + 1
Next ctl
i = i + 1
Next
End Sub
2.¨Ì»Ý¨D°õ¦æ ÁôÂà ©Î ¨Ï¥Î
Sub disPaste()
Dim i As Integer
Dim PasteCtls As CommandBarControls
Dim PasteCtl As CommandBarControl
'´M§ä©Ò¦³ [½Æ»s] «ö¶s, ¨äID¬°19
'´M§ä©Ò¦³ [°Å¤U] «ö¶s, ¨äID¬°23
'´M§ä©Ò¦³ [¶K¤W] «ö¶s, ¨äID¬°22
Set PasteCtls = Application.CommandBars.FindControls(Id:=848) ' ¿ï¨ú©Ò»Ý¤§ID-ù
'±N©Ò¦³ [½Æ»s] «ö¶s¥\¯à¨ú®ø
i = 0
Debug.Print PasteCtls.Count
For Each PasteCtl In PasteCtls
i = i + 1
Debug.Print i
PasteCtl.Enabled = True 'TRUE§Y¥i¦^ÂÐ-ù
Next
'¨ú®ø [½Æ»s] §Ö±¶Áä
Application.OnKey "^v", ""
'¤u§@ªí¼ÐÅÒ¥kÁä©Ò¸õ¥X¨Óªº "ply" ¤u¨ã¦C"²¾°Ê©Î½Æ»s(M)..." «ö¶s¥i²¾°Ê¨Ã²£¥Í°Æ¥»
'¦]¦¹¤@¦}¸T¤î
Application.CommandBars("ply").Controls(5).Enabled = True 'TRUE§Y¥i¦^ÂÐ-ù
'¥H¤WÀ³¸Ó´NµLªk½Æ»s¤F
End Sub |
|