Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run Macro From If Statement


Is there a command to run a macro as the condition for TRUE in an I
statement

--
bhaloonee
-----------------------------------------------------------------------
bhalooneel's Profile: http://www.excelforum.com/member.php...fo&userid=2402
View this thread: http://www.excelforum.com/showthread.php?threadid=37638

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run Macro From If Statement


Could you tell where is the IF statment located? in a Cell or in
Macro? it depends...

bhalooneel Wrote:
Is there a command to run a macro as the condition for TRUE in an I
statement


--
jose lui
-----------------------------------------------------------------------
jose luis's Profile: http://www.excelforum.com/member.php...fo&userid=1331
View this thread: http://www.excelforum.com/showthread.php?threadid=37638

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run Macro From If Statement


It's in the cell.


--
bhalooneel
------------------------------------------------------------------------
bhalooneel's Profile: http://www.excelforum.com/member.php...o&userid=24023
View this thread: http://www.excelforum.com/showthread...hreadid=376381

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Run Macro From If Statement


bhalooneel Wrote:
It's in the cell.


1. Put your IF in the cell
2. Label the cell (lets say SwCell)
3. put your macro in the Worksheet.Calculate. Something like



Code:
--------------------
If Range("Condition onSwCell") Then
Your Code
Else
your code
End If
--------------------


4. Pull the result of the Cell to your Macro with Range("Condition
onSwCell")


Your Macro will run every time the worksheet is calculated, if it in
automatic calculation, always will be testting your condition and doing
your code.


Hope this helps

Regards

Jose Luis


--
jose luis
------------------------------------------------------------------------
jose luis's Profile: http://www.excelforum.com/member.php...o&userid=13312
View this thread: http://www.excelforum.com/showthread...hreadid=376381

Reply
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
Macro if and / or statement orquidea Excel Discussion (Misc queries) 4 April 4th 23 10:27 AM
If Statement to run a macro Secret Squirrel Excel Discussion (Misc queries) 4 July 15th 08 03:43 PM
If statement in macro orquidea Excel Discussion (Misc queries) 2 May 11th 08 08:19 PM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM
If-statement in Macro fabalicious[_25_] Excel Programming 1 October 8th 04 08:40 AM


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

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"