I used the macro recorder to create a script shown below. The problem is that I need the sheet name reference to be the name of the sheet that I am in when running the script. Is this possible?
Also, the script refers to a table, which i also need to reference the table name of the table I am currently in. Is this possible as well?
In other words, both the sheet name and table name need to be dynamic rather than fixed, and I just don't know how to go about that. Thanks in advance!
Application.Goto Reference:="pt"
Selection.Copy
Sheets("Sheet1").Select
Range("Table7[[#Headers],[Date]]").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Columns("A:A").EntireColumn.AutoFit
Also, the script refers to a table, which i also need to reference the table name of the table I am currently in. Is this possible as well?
In other words, both the sheet name and table name need to be dynamic rather than fixed, and I just don't know how to go about that. Thanks in advance!
Application.Goto Reference:="pt"
Selection.Copy
Sheets("Sheet1").Select
Range("Table7[[#Headers],[Date]]").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Columns("A:A").EntireColumn.AutoFit