R
ranswert
When I run the following code from a userform I get a 'subscript out of range
error'. What am I doing wrong?
Private Sub CommandButton1_Click()
Dim costitem As String
unprotectsheet
costitem = ComboBox1.Value
If costitem <> "" Then
Range("costitemrng").Find(what:=costitem, lookat:=x1whole,
LookIn:=x1values, searchorder:=x1bycolumns).Activate
'selectcostitem.Hide
'Editcostitem.Show
End If
selectcostitem.Hide
protectsheet
End Sub
Thanks
error'. What am I doing wrong?
Private Sub CommandButton1_Click()
Dim costitem As String
unprotectsheet
costitem = ComboBox1.Value
If costitem <> "" Then
Range("costitemrng").Find(what:=costitem, lookat:=x1whole,
LookIn:=x1values, searchorder:=x1bycolumns).Activate
'selectcostitem.Hide
'Editcostitem.Show
End If
selectcostitem.Hide
protectsheet
End Sub
Thanks