Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
sub call with string
hello
i have a combobox were i chose a value and like to run a sub were the name of the value is the name of the sub how do i do |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
sub call with string
try using
Application.Run (MacroName) "aran" wrote: hello i have a combobox were i chose a value and like to run a sub were the name of the value is the name of the sub how do i do |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
sub call with string
Hello thanks
that seem to work on macros but if i like too run a sub in the same sheet "JMB" wrote: try using Application.Run (MacroName) "aran" wrote: hello i have a combobox were i chose a value and like to run a sub were the name of the value is the name of the sub how do i do |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
sub call with string
A sub in the same sheet? Is the sub an event handler or just a regular
macro? If it's just a regular macro I'd move it to a regular module (I don't think VBA looks for plain-vanilla macros in the sheet modules). If you're trying to call an event handler, can you move the guts of your second event handler to a macro in a standard module and replace with a call to the macro (ie both event handlers would call the same macro). "aran" wrote: Hello thanks that seem to work on macros but if i like too run a sub in the same sheet "JMB" wrote: try using Application.Run (MacroName) "aran" wrote: hello i have a combobox were i chose a value and like to run a sub were the name of the value is the name of the sub how do i do |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
sub call with string
Thanks
Is it better to have the most subs in module and can i have as many subs i want in one module "JMB" wrote: A sub in the same sheet? Is the sub an event handler or just a regular macro? If it's just a regular macro I'd move it to a regular module (I don't think VBA looks for plain-vanilla macros in the sheet modules). If you're trying to call an event handler, can you move the guts of your second event handler to a macro in a standard module and replace with a call to the macro (ie both event handlers would call the same macro). "aran" wrote: Hello thanks that seem to work on macros but if i like too run a sub in the same sheet "JMB" wrote: try using Application.Run (MacroName) "aran" wrote: hello i have a combobox were i chose a value and like to run a sub were the name of the value is the name of the sub how do i do |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
sub call with string
I have not run into problems with limits on the number of macros in a module.
If you want, you can add more modules. I've never run into problems w/not being able to add enough modules either. I think it's better practice to keep your macros and functions in standard code modules and your worksheet level event handlers in your worksheet modules. Excel doesn't always look for a public macro in a worksheet module. If you create a button using the forms toolbar, you cannot assign any macros from the worksheet modules - Excel does not make those available, which makes sense as event handlers cannot be called in that fashion. "aran" wrote: Thanks Is it better to have the most subs in module and can i have as many subs i want in one module "JMB" wrote: A sub in the same sheet? Is the sub an event handler or just a regular macro? If it's just a regular macro I'd move it to a regular module (I don't think VBA looks for plain-vanilla macros in the sheet modules). If you're trying to call an event handler, can you move the guts of your second event handler to a macro in a standard module and replace with a call to the macro (ie both event handlers would call the same macro). "aran" wrote: Hello thanks that seem to work on macros but if i like too run a sub in the same sheet "JMB" wrote: try using Application.Run (MacroName) "aran" wrote: hello i have a combobox were i chose a value and like to run a sub were the name of the value is the name of the sub how do i do |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel: Use pic location string to call up picuture in cell? | Excel Discussion (Misc queries) | |||
Call Center Management: How to calculate 'cost per call' | Excel Discussion (Misc queries) | |||
to search for a string and affect data if it finds the string? | Excel Worksheet Functions | |||
Excel4 Call to get Function String | Excel Programming | |||
Create a formula into a String then assign string to a cell | Excel Programming |