![]() |
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 |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 08:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com