Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Defined Name Constant String
I'm trying to change the defined name string constant using VBA. Is it
possible? Here is my code: Sub ChangeNameString() Dim Next_String As String ' this works ok, defined name shows "First_String" (with quotes) (not a variable) ActiveWorkbook.Names.Add Name:="MyString", _ RefersToR1C1:="=""First_String""" Next_String = "Second_String" ' doesn't work when attempting to change name with Next_String varible (no quotes) ActiveWorkbook.Names.Add Name:="MyString", _ RefersToR1C1:="=" & Next_String End Sub I've tried several variations but nothing works. Any ideas? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Change 3 letter text string to a number string | Excel Discussion (Misc queries) | |||
How can I change the tab but keep the row and column constant when | Excel Worksheet Functions | |||
Change a constant from VB | Excel Programming | |||
How to replace defined portion of string | Excel Programming | |||
How will I do Excel user-defined function to extract letters from string | Excel Programming |