Results 1 to 4 of 4

using the or statement in VBA

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,176

    using the or statement in VBA

    I have a bit of code in which I am trying to use the or statement. I've tried a couple of methods but neither seem to work. Is "or" a valid command in VBA? Thanks.
                If Target.Column = or(3,17) Then
                    SortOrder = 1
                Else
                    SortOrder = 2
                End If
    also tried
                If Target.Column = 3 Or 17 Then
                    SortOrder = 1
                Else
                    SortOrder = 2
                End If
    Last edited by maacmaac; 08-12-2009 at 04:13 PM.

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