View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Variable procedure call

dim myStr as string
mystr = "Sub1"
application.run "'" & thisworkbook.name & "'!" & mystr





Art wrote:

Hi,

Does anyone know if I can, during runtime, call a procedure with a variable
name? For example, I'd like to pass a parameter to a calling procedure, and
then based on that parameter call another procedure. I'm sure I cheat and do
it with a select statement, but I'd like to do it more directly if possible.

Thanks,

Art


--

Dave Peterson