Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am running the following code that I got from this newsgroup,
...... Sub NameMe() Dim strName As String Dim strAddr As String strName = ActiveCell.Value strAddr = ActiveCell.Address(, , xlR1C1) ActiveWorkbook.Names.Add _ Name:=strName, _ RefersToR1C1:="=Sheet1!" & strAddr End Sub ..... For some reason the Names.Add function will not accept the string. It will accept strings which I manually type, eg. "typedname", but not strings set to the ActiveCell.Value. Is there some way to work around this? Can I add quotes to the string somehow? Am I barking up the wrong tree? Any help is appreciated, Petur G |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy name from active sheet to cell - using macro or function | Excel Worksheet Functions | |||
need to Copy or Move to active cell from specified range | Excel Discussion (Misc queries) | |||
To copy from a range in another sheet to the active cell | Excel Programming | |||
Macro Copy Active Cell to Range Name, loop | Excel Programming | |||
Macro to copy cell data to word document based on an active row? | Excel Programming |