My problem:
When trying to Set Table = cSheet.Range(brand_edit) (brand_edit is a variable with the value of a table name) I get Run-time error '1004': Method 'Range' of object '_WorkSheet' failed.
I think it is because I am trying to find the range of a variable's value and I can't think of a way to fix this.
More Info:
I am making a userform that allows the user to grab an Item ID from a Data Sheet in excel and fill a table/item list with the data from the row the Item ID leads.
I have setup a combobox that grabs my table of contents (the Brands) from the Data Sheet (I made it into a table and used the table as the RowSource). I then setup another combobox that displays the Item ID's from the selected Brand. When you select a particular ID I am trying to get it to grab the data from the row in the table that that Item ID leads.
Each Brand has a table tied to it I use some funky replacing to get it to match the table naming scheme. I use these tables as flexible ranges (these tables will change over time so I need to account for that). The item ID's lead the rows and each row has information about the item (cost, description, etc.)
If there are better ways to do any of these things, I am open to ideas.

These are some questions I viewed to try to solve this: This one introduced me to the code for this and I tried factoring to my use case and I got errors. Excel VBA - select, get and set data in Table
Public brand_edit As String
Private Sub cmbItemID_Change()
Dim cBook As Workbook
Dim cSheet As Worksheet
Dim ItemID As String
Dim Brand_Table As String
Dim test As String
Dim i As Long
Dim Table As ListObject
Set cBook = ActiveWorkbook
Set cSheet = cBook.Sheets("Gen. Info")
ItemID = cmbItemID.Value
Brand_Table = brand_edit
MsgBox Brand_Table
Set Table = cSheet.Range(brand_edit).Select
For i = 1 To Table.ListRows.Count
If Table.ListColumns(1).DataBodyRange.Rows(i) = ItemID Then
MsgBox ItemID
End If
Next
MsgBox test
End Sub
Public Sub cmbItemID_DropButtonClick()
'funky replacing
Dim brand As String
brand = cmbBrand.Value
brand_edit = Replace(brand, " ", "_")
brand_edit = Replace(brand_edit, """", "")
brand_edit = Replace(brand_edit, "-", "")
brand_edit = Replace(brand_edit, "__", "_")
brand_edit = LCase(brand_edit)
cmbItemID.RowSource = brand_edit
End Sub




