MrProgrammer
Programmer
Hi everybody,
I want to ask something. I have an excel file which contains some records with special formats. For example one field has "0000000000" custom format which means even I enter 100 to that cell's value, it is seen as 0000000100.
Here is my problem. I want to concatenate each row's fields and write each record into a text file line by line. when concatenating fileds, I use & operator.
For example;
Open "BLABLA.TXT" For Output As #1
rowtext = Range("A2"
.Value & Range("B2"
.Value .....
Write #1, rowtext
Close #1
Here is the problem: cell's values are taken without their formats. For example A2 cell contains value 100 and its format is 0000000000. So I want to write it as 0000000100 into the text file. But Range("A2"
.Value returns just 100 not 0000000100. Is there a short way of doing this?
Thanks in advance.
I want to ask something. I have an excel file which contains some records with special formats. For example one field has "0000000000" custom format which means even I enter 100 to that cell's value, it is seen as 0000000100.
Here is my problem. I want to concatenate each row's fields and write each record into a text file line by line. when concatenating fileds, I use & operator.
For example;
Open "BLABLA.TXT" For Output As #1
rowtext = Range("A2"
Write #1, rowtext
Close #1
Here is the problem: cell's values are taken without their formats. For example A2 cell contains value 100 and its format is 0000000000. So I want to write it as 0000000100 into the text file. But Range("A2"
Thanks in advance.