Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all.
I use VB6 to create an Excel file. I have a recordset with text value (e.g. "03") which I populate to the Excel file. When I open the Excel file, the value is "3" only without the "0" prefix. I tried : xlsSheet.Cells(R,C).NumberFormat = "@" The original number format was "General" (I quick-watched it). Please advise Guy |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Guy
How are you populating? This seems to work With objXl.ActiveCell .NumberFormat = "@" .Value = "03" End With -- Dick Kusleika Excel MVP Daily Dose of Excel www.dicks-blog.com Me wrote: Hi all. I use VB6 to create an Excel file. I have a recordset with text value (e.g. "03") which I populate to the Excel file. When I open the Excel file, the value is "3" only without the "0" prefix. I tried : xlsSheet.Cells(R,C).NumberFormat = "@" The original number format was "General" (I quick-watched it). Please advise Guy |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Dick Kusleika,
Its working now... I really do not know what was wrong before... Thank you anyway! Guy "Dick Kusleika" ëúá ... Guy How are you populating? This seems to work With objXl.ActiveCell .NumberFormat = "@" .Value = "03" End With -- Dick Kusleika Excel MVP Daily Dose of Excel www.dicks-blog.com Me wrote: Hi all. I use VB6 to create an Excel file. I have a recordset with text value (e.g. "03") which I populate to the Excel file. When I open the Excel file, the value is "3" only without the "0" prefix. I tried : xlsSheet.Cells(R,C).NumberFormat = "@" The original number format was "General" (I quick-watched it). Please advise Guy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Conditional formatting--different formatting depending on cell con | Excel Discussion (Misc queries) | |||
Protect Cell Formatting including Conditional Formatting | Excel Discussion (Misc queries) | |||
conditional Formatting based on cell formatting | Excel Worksheet Functions | |||
conditional Formatting based on cell formatting | Excel Worksheet Functions | |||
expanding custom formatting without removing existing cell formatting? | Excel Worksheet Functions |