Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Create Macro Button

  1. #1
    Board Regular
    Join Date
    Mar 2002
    Posts
    67
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have a VBA code and I want the code to be run by different workbooks separately and not depend on other workbook.
    I've created a button in a toolbar to run the code. However, the button depends on the workbook which the code is last assigned.
    Is there a way to create the button so the macro can run on each workbook separately??

    Please Help
    Thanks in advance

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Mate


    I would suggets a switchboard.. thats a userform to Excel users,, assign whatever you nne to each command button and just one icon on tool bar pulls up userform.. the worlds you oyster then......


    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

  3. #3
    Board Regular
    Join Date
    Mar 2002
    Posts
    67
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Are you saying that I should create 8 buttons if I have 8 workbooks and assign the macro to those 8 buttons according to those workbooks?
    Sorry I don't think I really get your answer.
    Can you explain a little bit more please
    Thanks in advance

  4. #4
    Board Regular
    Join Date
    Feb 2002
    Posts
    3,184
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    /////I have a VBA code and I want the code to be run by different workbooks separately and not depend on other workbook.

    OK a button for each might not be ideal but give 100% control over things...

    .......I've created a button in a toolbar to run the code.

    Assign this to pull up the userform ....

    ///////However, the button depends on the workbook which the code is last assigned.

    This method matter little you choose which to run REGARDLESS thus 100% control.. makes the code sdmall and bitty but editable easly.

    ////Is there a way to create the button so the macro can run on each workbook separately??

    Of casue as you say assign as many command buttons to each shhet as needed 1 or 100 matters not.. i even have buttons to pull up dioalog which mention storys of old pals and dead friends.. in memory .. you can do as you please from user form.. add bits and snips as you want.. easy work once you get the hang..

    Click toolbar

    up pops user form select code to execute...

    Thats it... Name each button for ease of reference....


    Free Excel based Web Toolbar available here.

    Jack in the UK
    J & R Excel Solutions
    "making Excel work for you"

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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