Johnny C
Well-known Member
- Joined
- Nov 7, 2006
- Messages
- 1,069
- Office Version
- 365
- Platform
- Windows
I'm creating a lot of tables so am using VBA.
This doesn't work ...
But this does ...
why is that?
This doesn't work ...
Code:
InputName = "Input_" & ActiveSheet.Name
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$B$12:$C$38"), , xlYes).Name = Input_Name
But this does ...
Code:
ActiveSheet.ListObjects.Add(xlSrcRange, Range("$B$12:$C$38"), , xlYes).Name = "Input_" & ActiveSheet.Name
why is that?