Formatting a cell

  • Thread starter Thread starter Me
  • Start date Start date
M

Me

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
 
Guy

How are you populating? This seems to work

With objXl.ActiveCell
.NumberFormat = "@"
.Value = "03"
End With
 
Dear Dick Kusleika,
Its working now...
I really do not know what was wrong before...
Thank you anyway!
Guy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top