Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Converting Integers to text
I am having trouble converting an integer to text. I need to place a
leading zero next to the number when it is less than 10. Trying to change this: Print #1, "<html<titlepic" & i & "</title" To this: Print #1, "<html<titlepic" & TEXT(i,"00") & "</title" does not work because the "TEXT" function is not a VBA function. Any suggestions greatly appreciated. Geoff |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Converting Integers to text
Geoff E wrote:
I am having trouble converting an integer to text. I need to place a leading zero next to the number when it is less than 10. Trying to change this: Print #1, "<html<titlepic" & i & "</title" To this: Print #1, "<html<titlepic" & TEXT(i,"00") & "</title" does not work because the "TEXT" function is not a VBA function. Any suggestions greatly appreciated. Geoff In VBA use Format(i,"00") |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Converting Integers to text
Thank you smartin.
Worked a treat. Geoff On Sep 7, 9:41*am, smartin wrote: Geoff E wrote: I am having trouble converting an integer to text. I need to place a leading zero next to the number when it is less than 10. Trying to change this: Print #1, "<html<titlepic" & i & "</title" To this: Print #1, "<html<titlepic" & TEXT(i,"00") & "</title" does not work because the "TEXT" function is not a VBA function. Any suggestions greatly appreciated. Geoff In VBA use Format(i,"00") |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Converting Integers to text
YW. Funny thing is, I often find myself trying to use Format() as a
worksheet function. Doesn't work (^: Geoff E wrote: Thank you smartin. Worked a treat. Geoff On Sep 7, 9:41 am, smartin wrote: Geoff E wrote: I am having trouble converting an integer to text. I need to place a leading zero next to the number when it is less than 10. Trying to change this: Print #1, "<html<titlepic" & i & "</title" To this: Print #1, "<html<titlepic" & TEXT(i,"00") & "</title" does not work because the "TEXT" function is not a VBA function. Any suggestions greatly appreciated. Geoff In VBA use Format(i,"00") |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Stop Excel from converting integers into decimals (eg.; 12 to .12) | Excel Discussion (Misc queries) | |||
Stop Excel from converting integers into decimals? | Setting up and Configuration of Excel | |||
Converting a string to an array of integers | Excel Programming | |||
A list of Consecutive Integers, can I search for missing integers | Excel Worksheet Functions | |||
converting to Integers | Excel Worksheet Functions |