LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How can I insert a run macro command in the IF function?

Use the call command to run a macro from anywhere in a macro.

i.e. Assume you have a macro called "OtherMacro", that you require
running if the contents of a range, called "Answer" is equal to 5:-

Sub Example()

If Range("Answer").value = 5 then
Call OtherMacro
End If

End Sub



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
insert row / insert column command buttons fairgreen Excel Worksheet Functions 1 October 29th 07 02:41 PM
Insert macro in IF Function blade Excel Worksheet Functions 1 May 30th 06 10:06 PM
Is it possible to insert a macro command in an "IF" function? SandyLACA Excel Worksheet Functions 4 November 8th 05 10:46 PM
To set up a command that will insert a row, every fifth row? shanespop2b New Users to Excel 3 May 6th 05 04:32 PM
Command Button Function - Macro NickH[_2_] Excel Programming 3 January 22nd 04 11:02 AM


All times are GMT +1. The time now is 12:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"