![]() |
Check Box Show Hide
Hi,
Im trying to create a spreadsheet with a check box that returns a combo box when checked, and hide combo box when unchecked. Ive created the following code for the checkbox, however an €˜Object Required error is returned. Sub CheckBox1_Click() If CheckBox1.Checked = True Then CheckBox1.Text = "Checked" Else CheckBox1.Text = "Unchecked" End If End Sub Does anyone familiar with the €˜Object required code? Also, what line of code is needed to €˜show and hide the combo box? Thanks Paul |
Check Box Show Hide
Try .Value instead of .Text for the test, and .Caption when setting it.
-- HTH RP (remove nothere from the email address if mailing direct) "Paul" wrote in message ... Hi, I'm trying to create a spreadsheet with a check box that returns a combo box when checked, and hide combo box when unchecked. I've created the following code for the checkbox, however an 'Object Required' error is returned. Sub CheckBox1_Click() If CheckBox1.Checked = True Then CheckBox1.Text = "Checked" Else CheckBox1.Text = "Unchecked" End If End Sub Does anyone familiar with the 'Object' required code? Also, what line of code is needed to 'show and hide' the combo box? Thanks Paul |
All times are GMT +1. The time now is 11:06 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com