Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Vik Mehta
 
Posts: n/a
Default 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
  #2   Report Post  
Frank Kabel
 
Posts: n/a
Default

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


  #3   Report Post  
Harlan Grove
 
Posts: n/a
Default

"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.


  #4   Report Post  
Vik Mehta
 
Posts: n/a
Default

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

  #5   Report Post  
Frank Kabel
 
Posts: n/a
Default

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing a range name as an argument to the Index Function Michael Sharpe Excel Discussion (Misc queries) 3 September 5th 12 01:33 PM
ClearContents method on a passed range bryan New Users to Excel 2 January 19th 05 08:49 AM
named range refers to: in a chart Spencer Hutton Excel Discussion (Misc queries) 1 December 14th 04 10:15 PM
How to Link named ranges from multiple Workbooks into a single Wo. PMAP_HELP Excel Discussion (Misc queries) 1 December 14th 04 05:51 PM
Named dynamic ranges, copied worksheets and graph source data WP Charts and Charting in Excel 1 November 28th 04 05:19 PM


All times are GMT +1. The time now is 06:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"