Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: quick Q

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    19
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    how can u wirte a macro that says that if x is not 2 or 4 or 8 then exit macro

  2. #2
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Something like this.



    Select Case x

    Case 2 or 4 or 8
    yourmacro

    Case Else
    'Choose 1
    'Exit Sub
    'Stop
    End Select


    HTH

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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