How do i code in vb6 when i insert digit: 06 into one of the cells.Cos Currently it shows only 6 instead of 06. Thanks
Regards
Goh
Printable View
How do i code in vb6 when i insert digit: 06 into one of the cells.Cos Currently it shows only 6 instead of 06. Thanks
Regards
Goh
You could use the .NumberFormat="00" for the cell.
Of use Text as its format...
in excel itself how do i change that?
Moved from Classic VB forum. :)
Select the Cell or Cells then go to Format Menu then select Cells then select Text...Quote:
Originally Posted by Goh
hi sorry guys i think i have made a mistake here..I have a set of codes that actually open up a file which is saved as .csv and the input is per string basis through a loop.so there is no dim as excel.application so on and so forth...so how do i input with the numberformat ?
this is the way to alter the numberformat in VBA of a cell
this line wil alter it in the activesheet of the active workbookCode:Cells(Row, Column).NumberFormat = "#.###.###.#00"
if you are using severalsheets or workbooks you need to specify them too, like this:
Code:YourWorkbook.Sheets("YourSheet").Cells(Row, Column).NumberFormat = "#.###.###.#00"