brorick
05-24-2008, 01:40 PM
I can't understand why I am having a problem with the combo box on my UserForm. The initialize code on the form refers to main worksheet and the range on that worksheet. The combo box source refers to the range on another worksheet.
Range Name:
ItemsInfo = =OFFSET(frmProductInfo!$A$1,0,0,COUNTA(frmProductInfo!$A:$A),3)
Private Sub UserForm_Initialize()
Worksheets("frmInvoice").Select
Dim irng As Range
With Worksheets("frmProductInfo")
Set irng = Sheet5.Range("ItemsInfo")
cboItem.RowSource = irng.Resize(irng.Rows.Count - 1).Offset(1).Address
End With
End Sub
I am not sure why the combo box source refers to the column a on the main worksheet and not the range.
Range Name:
ItemsInfo = =OFFSET(frmProductInfo!$A$1,0,0,COUNTA(frmProductInfo!$A:$A),3)
Private Sub UserForm_Initialize()
Worksheets("frmInvoice").Select
Dim irng As Range
With Worksheets("frmProductInfo")
Set irng = Sheet5.Range("ItemsInfo")
cboItem.RowSource = irng.Resize(irng.Rows.Count - 1).Offset(1).Address
End With
End Sub
I am not sure why the combo box source refers to the column a on the main worksheet and not the range.