Thread: Call Macro
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
fi.or.jp.de fi.or.jp.de is offline
external usenet poster
 
Posts: 93
Default Call Macro

Thanks Don & Chip Pearson

It works great


On May 6, 3:40*am, "Don Guillett" wrote:
try it this way

Sub calla1()
On Error Resume Next
Application.Run "Main_" & Cells(1, "a")
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
" wrote in message

...



Hi All,


I have one main macro,


I have to call another macro like this


if Cells(1,"A").value = "AUSTRALIA" then Call Main_AUSTRALIA
if Cells(1,"A").value = "UNITED STATES" then Call Main_UNITED STATES


similarly there are 40 macros need to call.


Can i code like this


if Cells(1,"A").value < "" then Call Main_& cells(1,"A").value


thanks in advance- Hide quoted text -


- Show quoted text -