kelbellene Posted December 14, 2006 Posted December 14, 2006 Okay, I'm brand new to Visual Basic. When I close the spreadsheet I'm working on I get an Object Required error, which takes me to this:Private Sub ComboBox2_Change()If Not Closing Then If Range("O1").Value = 1 Then ComboBox6.Enabled = True ComboBox1.Enabled = True Else ComboBox6.Enabled = False ComboBox6.Value = 1 ComboBox1.Enabled = False ComboBox1.Value = 2 End If End IfEnd SubIt points specifically to "ComboBox6.Enabled = False". That is the correct object name. What am I doing wrong?Thanks!
IcemanND Posted December 14, 2006 Posted December 14, 2006 I have never seen nor can I find that CLOSING is a valid object or event.there are a couple of events related to worksheets closing. If you search for close or closing when in the VBA editor it will list them in the top 5 results.
kelbellene Posted December 14, 2006 Author Posted December 14, 2006 The first thing I tried was taking out the CLOSING stuff. I had copied and pasted that out of the old spreadsheet I'm attempting to recreate. Even without that it generates the same error. It does it here as well:Private Sub ComboBox3_Change()If Range("L1").Value > 4 ThenComboBox5.Enabled = FalseComboBox5.Value = 1ElseComboBox5.Enabled = TrueEnd IfEnd SubFor that it highlights "ComboBox5.Enabled = True".
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now