I have an Excel form and depending on which category the user selects, I want the rowsource properly to the combob box to change. However, this code is run, I get a datatype mismatch. I want to use range names rather than cell references as the ranges grow and contract according to data needed.
Private Sub optActiveMiscel_Click()
'Range name for this data is ss_ACTIVEMISC
'Data header is ACTIVE MISCELLANEOUS in column H
Me.lblProfileName.Caption = "Profile Name"
Me.lblURLSectorSummary.Caption = "Detail URL"
Me.txtURLSectorSummary.Visible = True
Me.lblURLSectorDetail.Visible = False
Me.txtURLSectorDetail.Visible = False
Me.lblURLRatingSummary.Visible = False
Me.txtURLRatingSummary.Visible = False
Me.lblURLRatingDetail.Visible = False
Me.txtURLRatingDetail.Visible = False
Me.cboPortCode.RowSource = ThisWorkbook.Worksheets("Settings").Range("cd_ActivePortfolios")