Meat4grinder
Board Regular
- Joined
- May 20, 2012
- Messages
- 66
Ok i have tried everything i could think of, need to populate a combo box with 2 different option but need the row source changed,
I have even tired
Error:
Run-time error '380': Could not set the rowsource property. Invalid property value.
however in most cases i can step thru it using F8 but code will not run thru it.
Working code below
Code:
Me.IP_CB_BracketUpgrade.RowSource = "=List_ABracket"
Me.IP_CB_BracketUpgrade.RowSource = "List_ABracket"
Me.IP_CB_BracketUpgrade.RowSource = List_ABracket
I have even tired
Code:
Dim List As string
List = "=List_ABracket"
Me.IP_CB_BracketUpgrade.RowSource = List
Error:
Run-time error '380': Could not set the rowsource property. Invalid property value.
however in most cases i can step thru it using F8 but code will not run thru it.
Working code below
Code:
Select Case ComDoorInf.Range("Drawn_bracketType").Value Case "A"
For i = 13 To 15
SizeSearch = ComDoorInf.Cells(i, 1).Value
Set WRng = CommWB.Sheets(Tarsheet).UsedRange.Find(SizeSearch, , xlValues, xlPart)
If Not WRng Is Nothing Then
RowNo = WRng.Row
ComDoorInf.Cells(i, 4).Value = CommWB.Sheets(Tarsheet).Cells(RowNo, TarColNo).Value
End If
Next i
Me.IP_CB_BracketUpgrade.Visible = True
Me.IP_CB_BracketUpgrade.RowSource = "List_ABracket"
Case "B"
For i = 16 To 17
SizeSearch = ComDoorInf.Cells(i, 1).Value
Set WRng = CommWB.Sheets(Tarsheet).UsedRange.Find(SizeSearch, , xlValues, xlPart)
If Not WRng Is Nothing Then
RowNo = WRng.Row
ComDoorInf.Cells(i, 4).Value = CommWB.Sheets(Tarsheet).Cells(RowNo, TarColNo).Value
End If
Next i
Me.IP_CB_BracketUpgrade.Visible = True
Me.IP_CB_BracketUpgrade.RowSource = List_BBracket
Case "C" 'Do nothing
Me.IP_CB_BracketUpgrade.Visible = False
End Select