Hi Guys
I have a combobox on one sheet and a data table on another sheet. I'd like to use the combobox selection and AfterUpdate event to rename the data table. I've not been able to manage to get it working and wondered if someone could help?
To clarify, I only have 1 table on sheet2
The code below is what I have so far:
Many thanks for taking a look
Cheers,
Richard
I have a combobox on one sheet and a data table on another sheet. I'd like to use the combobox selection and AfterUpdate event to rename the data table. I've not been able to manage to get it working and wondered if someone could help?
To clarify, I only have 1 table on sheet2
The code below is what I have so far:
Code:
[FONT='inherit']Private Sub CMB1_AfterUpdate()[/FONT]
[FONT='inherit'] With ThisWorkbook.Worksheets("Sheet2")
[COLOR=#008000][I]'range G3 is the linked cell from the CMB1 and contains the first 3 letters (Left Function) of the text selected[/I][/COLOR]
.ListObjects(1).Name = Sheets("Sheet2").Range("G3").Value & "Table" [/FONT]
[FONT='inherit']End With[/FONT]
[FONT='inherit']End Sub[/FONT]
Many thanks for taking a look
Cheers,
Richard