Koesper
01-24-2006, 04:32 AM
as i said in my previous post (http://vbaexpress.com/forum/showthread.php?t=6796) i'm relatively new to VBA, and so i have a lot of questions...
the background:
i'm building a tool where my users can do several magical things to an excel workbook full of addresses. One of the important requirements is extensibility, and that means that i should be able to add new 'filters' quickly.
Therefore i want to define all the 'filters' in a separate worksheet.
One of the elements in a filter-definition is which vba function should be called, and which arguments should be passed to that function.
can anyone tell me how to evaluate a variable so it becomes a function name?
example:
dim functionName = string
functionName = "doSomething"
activesheet.functionName("and some arguments here")
sub doSomething(theArgument as string)
activeCell.value = theArgument
end sub
I hope you understand what i am trying to accomplish, and if you could tell me how i can get it to work, that would be great!
the background:
i'm building a tool where my users can do several magical things to an excel workbook full of addresses. One of the important requirements is extensibility, and that means that i should be able to add new 'filters' quickly.
Therefore i want to define all the 'filters' in a separate worksheet.
One of the elements in a filter-definition is which vba function should be called, and which arguments should be passed to that function.
can anyone tell me how to evaluate a variable so it becomes a function name?
example:
dim functionName = string
functionName = "doSomething"
activesheet.functionName("and some arguments here")
sub doSomething(theArgument as string)
activeCell.value = theArgument
end sub
I hope you understand what i am trying to accomplish, and if you could tell me how i can get it to work, that would be great!