Hey there! Sign in to join this conversationNew here? Join for free

Simple Excel VBA hiding objects help? Watch

Announcements
    • Thread Starter
    Offline

    0
    ReputationRep:
    Hi,
    I am trying to hide the drop-down box "Drop1" when I select a check-box, "Checkbox1". I am new to VBA and here is the code I have got so far:

    Sub Checkbox1_Select()
    If ActiveSheet.Checkbox1.Value = True Then
    Drop1.Hidden = True
    Else
    Drop1.Hidden = False
    End If
    End Sub

    However I can't get it to work, and also my VBA says that line 2 of this code is wrong. Any ideas?
    Offline

    15
    ReputationRep:
    It may be because the .Hidden property does not exist, at least not in .NET.

    Drop1.Visible = False
 
 
 
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • Poll
    Will you be richer or poorer than your parents?
  • See more of what you like on The Student Room

    You can personalise what you see on TSR. Tell us a little about yourself to get started.

  • The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

    Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

    Quick reply
    Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.