gmcgough600
New Member
- Joined
- Nov 21, 2017
- Messages
- 33
- Office Version
- 365
Hi,
I'm trying to copy a named range without having to have the name of the range hard coded but having difficulty getting this to work, attempt below but it's not working as I expected it to:
This is at the top of the Module as I'm using a UserForm to define the variable site_name:
site_name has been set to "PEHE"
The named range is PEHE_PI_tags so I had assumed that I can construct this name from a combo of var and the text string "_PI_tags".
Thanks
I'm trying to copy a named range without having to have the name of the range hard coded but having difficulty getting this to work, attempt below but it's not working as I expected it to:
This is at the top of the Module as I'm using a UserForm to define the variable site_name:
Code:
Public site_name As String
site_name has been set to "PEHE"
Code:
Application.Range(site_name & "_PI_tags").Copy
The named range is PEHE_PI_tags so I had assumed that I can construct this name from a combo of var and the text string "_PI_tags".
Thanks