+ Reply to Thread
Results 1 to 2 of 2

VBA Assistance in Making a button to click all buttons thoughout a workbook

  1. #1
    Forum Contributor
    Join Date
    06-09-2009
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    155

    VBA Assistance in Making a button to click all buttons thoughout a workbook

    Hi

    I currently have a workbook with at least one button on most worksheets. The code behind each button is a normal sub (not private nor public and most use option explicit) and does not reference the individual worksheet except where it needs to pull data from other sheets in the course of carrying out calculations.

    I am now content that I can't progress the spreadsheet much further and would like to create a single button on the first sheet (which is actually sheet2 and has a seperate tab name "Last4") to trawl the other worksheets and click each button to update the workbooks.

    I appreciate this isn't the cleanest method but I'm looking at minimum time coding maximum time saving.

    The button I have created works fine whilst the master button is located on the first worksheet, but breaks before getting to further worksheets....any ideas??
    Last edited by opsman; 06-13-2012 at 05:39 PM.

  2. #2
    Forum Contributor
    Join Date
    06-09-2009
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    155

    Re: VBA Assistance in Making a button to click all buttons thoughout a workbook

    All

    For those trying to do this, I was not using Modules but instead putting code under specific buttons on individual worksheets. Excel didn't like this at all. I worked it out eventually though

    SOLUTION;

    Transfer the code from each button and literally put it straight into a Module. The only difference in code is as follows;

    Please Login or Register  to view this content.
    was changed to...

    Please Login or Register  to view this content.
    Then in the worksheet where I wanted a Master Button to run all workbook macros (having deleted all old buttons in the workbook) I created a new button and called the function from each module as follows having selected the relevant worksheet;

    Please Login or Register  to view this content.
    Works like a treat... so I thought I'd share it since in the past I have gained so much help out of the forum

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1