Single quotes in named range

  • Thread starter Thread starter Vik Mehta
  • Start date Start date
V

Vik Mehta

I am defining a name for a range using

ActiveWorkbook.Names.Add Name:=strDefName, RefersTo:=strRange.

strDefName has a single quote in it and it's causing an error.

Can anyone help me with this?

Thanks.
Vik
 
Vik Mehta said:
I am defining a name for a range using

ActiveWorkbook.Names.Add Name:=strDefName, RefersTo:=strRange.

strDefName has a single quote in it and it's causing an error.

Can anyone help me with this?

No way to help. Defined names may contain letter, decimal digits and
underscores. Nothing else. You can't put a single quote into a name.
 
Here is the strDefName assignment:

"A_Carol_O'Henry_UT"

Thanks,
Vik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top