ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Single quotes in named range (https://www.excelbanter.com/excel-worksheet-functions/6269-single-quotes-named-range.html)

Vik Mehta

Single quotes in named range
 
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

Frank Kabel

Hi
could you post your exact strDefName assignment

--
Regards
Frank Kabel
Frankfurt, Germany

"Vik Mehta" schrieb im Newsbeitrag
om...
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



Harlan Grove

"Vik Mehta" wrote...
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.



Vik Mehta

Here is the strDefName assignment:

"A_Carol_O'Henry_UT"

Thanks,
Vik

"Frank Kabel" wrote in message ...
Hi
could you post your exact strDefName assignment

--
Regards
Frank Kabel
Frankfurt, Germany

"Vik Mehta" schrieb im Newsbeitrag
om...
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


Frank Kabel

Hi
see Harlan's response

--
Regards
Frank Kabel
Frankfurt, Germany

"Vik Mehta" schrieb im Newsbeitrag
om...
Here is the strDefName assignment:

"A_Carol_O'Henry_UT"

Thanks,
Vik

"Frank Kabel" wrote in message

...
Hi
could you post your exact strDefName assignment

--
Regards
Frank Kabel
Frankfurt, Germany

"Vik Mehta" schrieb im Newsbeitrag
om...
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




All times are GMT +1. The time now is 03:08 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com