Writing a number from a cell into a text file
Writing a number from a cell into a text file
(OP)
Hi,
I am trying to prepare a text file from a portion of my spreadsheet. But, I have some issues with format of numbers.
For example, I have a number like 3.0 in a cell of my spreadsheet, when my VB subroutine writes this number, I will get 3 instead of 3.0. But, I really need to have 3.0 in the text file, because it is an input file for another program. I guess that there should be a command in VB to control the format of numbers during writing the external file. I appreciate to have your help.
A.A.Y.
I am trying to prepare a text file from a portion of my spreadsheet. But, I have some issues with format of numbers.
For example, I have a number like 3.0 in a cell of my spreadsheet, when my VB subroutine writes this number, I will get 3 instead of 3.0. But, I really need to have 3.0 in the text file, because it is an input file for another program. I guess that there should be a command in VB to control the format of numbers during writing the external file. I appreciate to have your help.
A.A.Y.





RE: Writing a number from a cell into a text file
RE: Writing a number from a cell into a text file
The MSDN site has the exact syntax but as long as the value returned by the cell is a number this should work. I think ;) It's been a while since I've done something like this.