+ Reply to Thread
Results 1 to 4 of 4

Working with Buttons in Worksheets

  1. #1
    Registered User
    Join Date
    11-29-2012
    Location
    Madison, WI
    MS-Off Ver
    MS Office 2010 (Excel, Word, Access)
    Posts
    72

    Working with Buttons in Worksheets

    Okay, so far I've managed to slog through most of the problems I've been having, and gotten to the point where I'm creating my macros to generate historical tabs.

    I have a basic template where my cost allocations and accounting codes are being recorded. I'm then copying that template as another worksheet, renaming it for the month that's being run, and overwriting its data as values, as follows:

    Please Login or Register  to view this content.
    So far, it works just fine. MakeHistory is called from an action button embedded in the worksheet through the "insert form controls" function on the Developer tab. But what I'd like to do next is to change the button so that it has different text ("Create History" -> "Fill Uploader") and references a new macro ("MakeHistory" -> "Uploaders"). The problem is that I can't find any way to reference the button object on the worksheet. Does anybody know where I should look?

    There are two UserForm modules in my project, but neither one has any code in it, leaving me inclined to think they're an artifact from the original worksheet that was created back in the day.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Working with Buttons in Worksheets

    What type of button is it you have on each sheet?

    If it's a Forms button, and it's the only button on the sheet you should be able to do something like this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    11-29-2012
    Location
    Madison, WI
    MS-Off Ver
    MS Office 2010 (Excel, Word, Access)
    Posts
    72

    Re: Working with Buttons in Worksheets

    Worked great, thanks! I didn't know I could just tag Buttons as a collection like that (I'm about 40% seminar taught, 50% self-taught past that, and 10% crossing my fingers and hoping it works).

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Working with Buttons in Worksheets

    Jason

    I think I stumbled upon Buttons (OptionButtons, Checkboxes...), not listed in the Object Browser, Intellisense or Help.

    Handy though.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Next and previous buttons not working
    By vijaynadiad in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-05-2013, 03:33 PM
  2. Two Toggle Buttons Working Together
    By sideburns in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-11-2013, 01:47 PM
  3. [SOLVED] Navigation Buttons not working (HTML)
    By Mariusz K in forum Excel General
    Replies: 0
    Last Post: 10-18-2005, 12:05 PM
  4. Form Buttons Not Working
    By SS in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-11-2005, 09:06 AM
  5. Replies: 1
    Last Post: 01-26-2005, 04:20 AM

Tags for this Thread

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