Consulting

Results 1 to 4 of 4

Thread: Want to use same CommandButton name more than once (ambiguos)

  1. #1

    Want to use same CommandButton name more than once (ambiguos)

    I would like to use the same CommandButton name repeatedly in an unlocked Word document. The CommandButton will call a macro. I would like to copy and paste the button repeatedly in the same document. I realize this is an ambiguous object. Microsoft Help seems to suggest using object and module variables is a way but I am lost trying to understand it. Thank you for your help.

    (Why I am doing this. I have used Macrobutton fields for many years. They can be copy and pasted. I am trying to switch to a tablet. A CommandButton can be activated with a finger tap but a Macrobutton cannot. In order for me to change to a tablet I would have to replace hundreds of identical macrobutton fields with Command buttons. It would be very easy if all I had to do is paste them in.)

  2. #2
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    Commandbuttons must have unique names. If you have three buttons, you must have three names.

  3. #3
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    Not only that, but unlike macrobuttons, each commandbutton must have its own separate individual click event.

  4. #4
    Quote Originally Posted by fumei View Post
    Not only that, but unlike macrobuttons, each commandbutton must have its own separate individual click event.
    Thank you for the prompt reply. I'll share some recent experience. I bought a Dell Venue W8.1 tablet with Word 2013 on it. Macros behave in a way I am still trying to get a handle on. Here is what I have discovered.

    Dell sells an electronic stylus. It can call a click event by simply hoving very near the screen and pressing a button or by tapping. I also have a non-battery stylus that is capacitive. The results are.

    Macrobutton - Will run with an electronic stylus tap but not a capacitive stylus tap. Will not run with finger tap.
    Command button - Will run with electronic stylus, capacitive stylus or finger tap.

    It seems odd a macrobutton field will not work with a finger tap and a commandbutton will. I also do not know if this is unique to Dell. I'll do some more testing as time passes and will update this thread.
    Thanks again.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •