Hello everyone,
This is my first post, so please accept my appologies if I have intruded any rules in my post.
So, I have created an excel file which has 11 tabs which some of them are connected to each other in terms of calculations.
The task for each one is to provide me with a text file output which is in a specific format which is later going to be an input to a very complicated FORTRAN code.
Right now I have 12 macros which almost does the job but there is one problem here,
I have formated some of my cells to have, say 3 decimal places and some with 6. But when the code reads it in order to make a text file out of that specific cell, It reads e.g. 1.000 as 1 and saves it in the file. How do I implement that in my macro code.
Sorry if the description was long. I wanted it to be complete. I cannot post my data since its confidential, but a part of my code that creates the file can be seen below:
oTSStream.Write rngeRangeToWrite.Cells(5, 4) & vbCrLf & strDashline & vbCrLf & Cells(7, 4) & vbCrLf
If Range("D7") = 1 Then
oTSStream.Write rngeRangeToWrite.Cells(8, 4) & strDelimiter & Cells(9, 4) & vbCrLf & strDashline & vbCrLf
End If
Best Regards,
Bookmarks