Results 1 to 3 of 3

Simple VBA Degub help

Threaded View

  1. #1
    Registered User
    Join Date
    01-24-2013
    Location
    NSW
    MS-Off Ver
    Excel 2010
    Posts
    2

    Simple VBA Degub help

    I am learning VBA using the dummies book, but need this to work now and would appreciate any help, it seems like it should be a simple answer.
    Private Sub ComboBox20_Change()
    If ComboBox20.Value = "Other (Specify)" Then TextBox18.Visible = True
    If ComboBox20.Value <> "Other (Specify)" Then TextBox18.Visible = False
    
    End Sub
    This code is just to make a text box appear or disappear depending on what is selected in a combo fox. SOMETIMES (but not always) when people open this spreadsheet i get 4 warnings for the 4 appearances of this code, with the opportunity to debug and it highlights the line:
    If ComboBox20.Value <> "Other (Specify)" Then TextBox18.Visible = False
    My theory is that this error's appearance is connected to whether the text boxes have been manually adjusted to true/false visibility in the properties box but im not sure. Could be missing something simple!

    Thanks for any help.

    Sincerely,

    Alex
    Last edited by Leith Ross; 01-24-2013 at 04:23 PM. Reason: Added Code tags

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