Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Garrett
 
Posts: n/a
Default how can I insert a macro into a boolean statement

now can I call a macro from a boolean statement i.e. "=if(c4<c5,call
macro,c4)"?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett
 
Posts: n/a
Default how can I insert a macro into a boolean statement

right click sheet tabview codeinsert this and enter =now() somewhere on
the sheet but be aware it will fire each time anything is calculated on the
sheet. You might prefer a worsheet_change event restricted to only cell c4

Private Sub Worksheet_Calculate()
Application.EnableEvents = False
If Range("c4") < Range("c5") Then MsgBox "HI"
Application.EnableEvents = True
End Sub

--
Don Guillett
SalesAid Software

"Garrett" wrote in message
...
now can I call a macro from a boolean statement i.e. "=if(c4<c5,call
macro,c4)"?



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
how to create automatic macro with if statement or similar betatryck_se Excel Discussion (Misc queries) 2 December 14th 05 11:32 AM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Run Macro From If Statement Paige Excel Discussion (Misc queries) 2 June 2nd 05 10:37 PM
How do I insert the date using a macro tara0801 Excel Discussion (Misc queries) 4 February 10th 05 09:09 PM
Macro and If Statement SATB Excel Discussion (Misc queries) 2 December 3rd 04 04:46 PM


All times are GMT +1. The time now is 07:30 PM.

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

About Us

"It's about Microsoft Excel"