Hey all, I'm trying to select a table on a worksheet and insert a column in this table. It needs to be code because it will eventually be applied to many, many tables. I'm just trying to work out the reference.
I get a "select method of range class failed" error. The problem is the sheet reference, I'm going to keep trying to figure it out but any help would be appreciated.
-Joe
Code:
Sub insert_col()
Dim sh As Worksheet
Set sh = Sheet3
sh.ListObjects("Table5").Range.Select 'Errors out
Selection.ListObject.ListColumns.Add Position:=3
End Sub
I get a "select method of range class failed" error. The problem is the sheet reference, I'm going to keep trying to figure it out but any help would be appreciated.
-Joe