Need help with Excel Form & ComboBox Tutorial

  • Thread starter Thread starter tmb
  • Start date Start date
T

tmb

At http://www.excel-vba.com/v-forms-controls.htm

I have followed instructions... my code on the form is below but it won't
run... I've marked the error...

Can anybody give me any help with this?

thanks

Code is below--------------

Private Sub cmdBtnSubmit_Click()
shReport.Range("C4").Value = cbxCity.Value
cbxCity.Value = "Select a City"
frmCity.Hide
End Sub

Private Sub cmdCityCancel_Click()

cbxCity.Value = "Select a City"
frmCity.Hide

End Sub

Private Sub UserForm_Activate()

shParameterst.Activate '<-----Run Time Error 424 - Object Required
cbxCity.ColumnCount = 1
cbxCity.RowSource = "A1:A5"

End Sub
 
Hi,tmb

Perhaps the Worksheet named "shParameterst" has been deleted or rename
,please check it.
 
What they seem to be forgetting to tell you is that you need to rename the
codename of the worksheet with the data to shParameters. Note the codename,
not the name that you see in the sheet tab in Excel.

To do this, select the sheet in the VBE, hit F4, and a properties window
should be there, with the Name property highlighted. Change the value there.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Back
Top