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

[µo°Ý] onaction="Macro",macro¦³°Ñ¼Æ¦p¦ó¼g§r

¦^´_ 8# Scott090
  1. Option Explicit
  2. Public a As String   '¤@¯ë¼Ò²Õªº¤Wªº¤½¥ÎÅܼÆ
  3. Sub Ex() 'OnActionªºµ{¦¡½X
  4.     a = "EXCEL" '²Ä¤@¦¸«öButton 1 ªº¤å¦r
  5.       ActiveSheet.Shapes.Range(Array("Button 1")).Select '»Ý´¡¤J«ö¶s(ªí³æ±±¨î¶µ)
  6.     Selection.OnAction = "'Ex_Macro a'"
  7.     ActiveCell.Activate
  8. End Sub

  9. Sub Ex1()
  10.     a = "Ex_Macro"
  11. End Sub
  12. Sub Ex_Macro(ByRef q As String)
  13.     MsgBox q
  14.     Ex1 '²Ä¤G¦¸¥H«á«ö Button 1 ªº¤å¦r
  15. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 11# GBKEE


    ·PÁ G¤j ªº¦^ÂСC
workbookÃö³¬«á¡A¦A¶}±Ò¡A²Ä¤@¦¸°õ¦æ«ö¶s«áÅã¥Ü a="EXCEL"³o­Ó°Ñ¼Æ¨Ã¥¼¶i¨Ó¦p¤U¹Ï
test.JPG

½Ð°Ý¡A°ÝÃD¦b­þ¸Ì
ÁÂÁÂ

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2018-8-8 16:45 ½s¿è

¦^´_ 12# Scott090

workbookÃö³¬«á¡A¦A¶}±Ò®É  
ThisWorkbook¼Ò²Õ¤W»Ý¦³³o¨Çµ{¦¡½X
  1. Option Explicit
  2. Private Sub Workbook_Open()
  3.     a="EXCEL"
  4. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 8# Scott090


·N«ü    onaction¤Þ¥Îªºµ{§Ç¤£­n¨Ï¥Î¤Þ¼Æ¡A©Î±N¤Þ¼Æ¥[¤Woptional¡A
¦p¦¹¤@¨Ó¡A¥\¯àªí¶µ¥Ø§Y¤£¥²³Q­­¨î©ó©T©w¤Þ¼Æ¡A
¦Ó¥Ñ¤Þ¥Îªºµ{§Ç¤Þ¥Î¦Û­qÅܼơA
¦p¦¹¤@¨Ó¡A¬Û¦P¥\¯àªí¦b¤£¦Pª¬ªp¤U¡A¥i°õ¦æ¤£¤@¼Ëªºµ{§Ç¹Lµ{¡C
Word§e²{·¥­PªºÀRºA¤§¬ü¡AExcel®i²{·¥­Pªº°ÊºA¤§¬ü¡C

TOP

¦^´_ 13# GBKEE


    ÁÂÁ G¤j «ü¤Þ
    ¾Ç²ß¤F

TOP

¦^´_ 10# Scott090
actioncontrol »P tag ªº¥Îªk,10#´£¨Ñºô­¶¤¶²Ð«Ü²M·¡,¨Ã¤£½ÆÂø,À³¸Ó¦n¦n¥Î.
lmh

TOP

        ÀR«ä¦Û¦b : ¤H­nª¾ºÖ¡B±¤ºÖ¡B¦A³yºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD