Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JAD JAD is offline
external usenet poster
 
Posts: 43
Default Assigning Macro to Form Button

Is there an alternative method to assigning a macro to s form button? The
right click and choose takes a long time when assigning over 200 form
buttons. Any help would be appreciated. Thank You, JAD
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Assigning Macro to Form Button

Do you have 200 individual macros or are you assigning the same one to 200
buttons?

"JAD" wrote:

Is there an alternative method to assigning a macro to s form button? The
right click and choose takes a long time when assigning over 200 form
buttons. Any help would be appreciated. Thank You, JAD

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Assigning Macro to Form Button

Your options with a form button are limited. If you were using a Control
Toolbox button then it is possible to use one button to run one of several
macros using either a select case statement or an If...ElseIf...Then
statement to run a certain macro based on a criteria. It is difficult to
make a good suggestion without more detail of what you are trying to do.

"JAD" wrote:

Is there an alternative method to assigning a macro to s form button? The
right click and choose takes a long time when assigning over 200 form
buttons. Any help would be appreciated. Thank You, JAD

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Assigning Macro to Form Button

You could do it in code, but some way, you'd have to know which buttons get
which macro assigned.

Maybe a table on a worksheet with button names and macro names???

JAD wrote:

Is there an alternative method to assigning a macro to s form button? The
right click and choose takes a long time when assigning over 200 form
buttons. Any help would be appreciated. Thank You, JAD


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Assigning Macro to Form Button

ps. Or if it's the same macro...

You could just use a single button and process the row with the activecell.

JAD wrote:

Is there an alternative method to assigning a macro to s form button? The
right click and choose takes a long time when assigning over 200 form
buttons. Any help would be appreciated. Thank You, JAD


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Assigning Macro to Form Button

I can't imagine 200 separate macro buttons but one way of doing this is to
assign all to one macro that uses this idea tied to a table on a worksheet.

Sub vLookupValues()
lr = [a7].End(xlDown).Row
Application.Calculation = xlManual
sn = Application.Caller
x = Application.Match(sn, [SetupA], 0) + 3
'========= Not necessary due to sheet name macro
Sheets("Checks").Shapes(sn).Select
'Selection.Characters.Text = Sheets("setup").Cells(x, 2)
'=======
If Sheets("setup").Cells(x, 2) = "" Then GoTo nomo
Cells(lr, 2) = Sheets("setup").Cells(x, 3)
Cells(lr, 3) = Sheets("setup").Cells(x, 4)
Cells(lr, 4) = Sheets("setup").Cells(x, 5)
Cells(lr, 5) = Sheets("setup").Cells(x, 6)
Cells(lr, 6) = Sheets("setup").Cells(x, 7)
Cells(lr, 7) = Sheets("setup").Cells(x, 8)
Cells(lr, 8) = Cells(lr - 1, 8) + Cells(lr, 4)
Cells(lr, 4).Select
nomo:
Application.Calculation = xlAutomatic
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"JAD" wrote in message
...
Is there an alternative method to assigning a macro to s form button? The
right click and choose takes a long time when assigning over 200 form
buttons. Any help would be appreciated. Thank You, JAD


Reply
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 hberg Excel Worksheet Functions 1 January 27th 10 10:31 PM
Assigning A Macro to A Button Holly Excel Worksheet Functions 1 January 18th 08 10:04 AM
Assigning macro to button d Excel Discussion (Misc queries) 0 August 22nd 05 01:40 PM
Assigning a macro to a button Junkyard Engineer Excel Programming 3 June 9th 05 02:00 PM
Assigning backgroundcolor to button on form Brotha lee Excel Programming 2 May 20th 05 09:55 PM


All times are GMT +1. The time now is 04:06 AM.

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"