Power Query Course in Spanish
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Having trouble with IF in VBA ...

  1. #1
    Board Regular Chris The Rock's Avatar
    Join Date
    Feb 2002
    Location
    Longmont, CO
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I want a message box to pop up IF the Column that the active cell is in is Hidden.

    I tried this:
    If ActiveCell.EntireColumnHidden = True Then

    but I get "Object Doesn't support this property or method".

    I suppose this is because I'm trying to describe the property of the cell rather than telling the program to change the cell's property.
    "Never go in against a Sicilian when death is on the line!"

  2. #2
    MrExcel MVP Tom Urtis's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, California USA
    Posts
    11,162
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Here's what works when I try it:

    Sub ColState()
    If ActiveCell.EntireColumn.Hidden = True Then
    MsgBox "Help, I'm lost!"
    End If
    End Sub



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
  •