Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thx Alfred.
I set added single quote in front of the number but it returned the string with the quote as well when I retrieve the data from the name. Cheers, Michael "Alfred B" ¦b¶l¥ó ¤¤¼¶¼g... Hi Michael. Use ' in front of the number - Excel handles it as a string. Like: "'0000304" Regards, Alfred "Michael Tse" wrote in message ... Hi, I stored some invisible data in the workbook by using the names. It works perfectly in most case. But when I assigned a string that only contains numeric chars to a name. It comes out with an integer and the chars has been changed! (Just like when u type "0001" into a cell in excel it auto-format and change it to "1") Anyone knows how to prevent the auto-format happened in the content of names? Thx. Here is the quote of my code: Dim key as string key = "0000304" ThisWorkbook.Names.Add Name:="key", RefersTo:=key, Visible:=False MsgBox [key] 'I want "0000304" but it gave "304" Thanks a lot Michael |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Extract names from string based on value list | Excel Worksheet Functions | |||
storing data | Excel Worksheet Functions | |||
Storing Formulas to Use | Excel Worksheet Functions | |||
Storing data | New Users to Excel | |||
Storing Values | Excel Discussion (Misc queries) |