Single quotes in named range

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
 
H

Harlan Grove

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.
 

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

Top