LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Automatically Assigning a Macro to a button

Hi, this is my first post on Google groups, here goes, I have this
program that, given a lifespan of years say from 2004 to 2008, it
creates a sheet for each year, then it creates a button for each sheet
on the "Cover Sheet". What i'm trying to do is to get my program to
assign a macro to each button that takes it to its corresponding
sheet. I can get it to assign a macro to it but the macro doesn't
know what sheet the button is supposed to send you to. I was thinking
if i can read the name of the button put it into a variable in the
little macro takes you to whatever page then do a Sheets().Select with
the variable name in the parenthesis. Problem is I don't know how to
read the buttons name. I just want one macro that can be flexible
enough to take you to any sheet given the buttons name. Any help would
be greatly appreciated, thank you.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning A Macro to A Button Holly Excel Worksheet Functions 1 January 18th 08 10:04 AM
assigning a macro to a button Darby Excel Discussion (Misc queries) 2 February 10th 06 05:05 PM
assigning macro to button BorisS Excel Discussion (Misc queries) 2 September 12th 05 05:08 AM
Assigning macro to button d Excel Discussion (Misc queries) 0 August 22nd 05 01:40 PM
Automatically Assigning a Macro to a button David Excel Programming 6 April 27th 04 03:11 AM


All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"