![]() |
Formatting a cell
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 |
Formatting a cell
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 |
Formatting a cell
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 |
All times are GMT +1. The time now is 10:39 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com