+ Reply to Thread
Results 1 to 2 of 2

command to do "nothing" in If/Then statement? #2

  1. #1
    Janis
    Guest

    command to do "nothing" in If/Then statement? #2

    I want to cancel out the then part of an if/then but not change anything else.
    I want it to do "nothing" instead of what it is doing.
    I tried commenting out the then part and I got a run time error so I just
    want it to exit the then portion and keep running.

    if range.value = placeholder
    then exit if

    Can you use the command "exit if"
    I'm trying to exit the If statement and keep the procedure running but void
    out the if/then statement without changing any placeholder references.
    thanks,

  2. #2

    Re: command to do "nothing" in If/Then statement? #2

    How about instead reversing your logic:

    If Range.Value <> placeholder then
    'code to do something here
    End if


    Janis wrote:
    > I want to cancel out the then part of an if/then but not change anything else.
    > I want it to do "nothing" instead of what it is doing.
    > I tried commenting out the then part and I got a run time error so I just
    > want it to exit the then portion and keep running.
    >
    > if range.value = placeholder
    > then exit if
    >
    > Can you use the command "exit if"
    > I'm trying to exit the If statement and keep the procedure running but void
    > out the if/then statement without changing any placeholder references.
    > thanks,



+ 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