Hello everyone;
I am a complete newbie so bear with please. I have been trying to name a selected range in VBA. Code so far is as follows:
ActiveSheet.Name = TextN
Range("c9").CurrentRegion.Select
Call formatting
ActiveWorkbook.Names.Add Name = "formTextN", RefersToR1C1 = Worksheets(TextN) & "!" & "r9c2:r45c13"
The formatting only works if I place it ahead of the activeworkbook line. But the range is never named.
Please advise as what I am doing wrong.
Thanks in advance.
Paolo
Bookmarks