Combo box error

  • Thread starter Thread starter Greg
  • Start date Start date
G

Greg

Hi all, what am I doing wrong with the vb code below.
I am trying to get the rowsource from a sheet called "mainsheet"
and the range f22 to f23


If Sheet1.Range("F18").Value = 8 Then
MsgBox "8"
ComboBox1.RowSource = Sheet1.Range("F22:F31")

ComboBox1.Visible = True

End If

Thanks
 
It's a string property, so try

If Sheet1.Range("F18").Value = 8 Then
MsgBox "8"
ComboBox1.RowSource = Sheet1.Range("F22:F31").Address(,,,True)

ComboBox1.Visible = True

End If


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top