+ Reply to Thread
Results 1 to 2 of 2

how can I insert a macro into a boolean statement

  1. #1
    Garrett
    Guest

    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. #2
    Don Guillett
    Guest

    Re: how can I insert a macro into a boolean statement

    right click sheet tab>view code>insert 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
    dguillett1@austin.rr.com
    "Garrett" <Garrett@discussions.microsoft.com> wrote in message
    news:F434149A-8CC8-49C8-8B40-78AD47F429AC@microsoft.com...
    > now can I call a macro from a boolean statement i.e. "=if(c4<c5,call
    > macro,c4)"?




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1