View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Patrick C. Simonds Patrick C. Simonds is offline
external usenet poster
 
Posts: 343
Default ComboBox Rowsource question

I tried this a few different ways, no of which worked:

Private Sub Worksheet_Activate()
ComboBox1.RowSource = ActiveSheet.Name & "!$P$1:$P$300"

End Sub

Private Sub Worksheet_Activate()
With UserForm2
ComboBox1.RowSource = ActiveSheet.Name & "!$P$1:$P$300"
End With
End Sub

Both of which returned an "Object Required error"

And then within the UserForm Initialization, but it returned "Could not set
the RowSource property. Invalid property value"

"Nigel" wrote in message
...
Define/re-define the row source with

ComboBox1.RowSource = ActiveSheet.Name & "!$P$1:$P$300"

When you do this needs to be controlled, maybe the worksheet activate
event?

--

Regards,
Nigel




"Patrick C. Simonds" wrote in message
...
I have a UserForm with a ComboBox. The current RowSource for the ComboBox
is shown below. Is it possible to make the RowSource be the range
$P$2:$P$300 of the active worksheet? I have 12 different worksheets that
can call this one UserForm.

'Names'!$P$2:$P$300