Hello people,
Once again I must turn to the extremely helpfull resource of this forum! In the last episode, I was helped with exporting excel selections bits to a txt file. I can now do that, to any directory with any filename. Super! But...
The way the files are formatted isn't quite correct. The exported files are used in a computer game, where they serve as the physics parameters for a driving game.
Lots of cells are made like this:
="SteerLockRange=(" & F137 & "," & F139 & "," & ((F138-F137)/F139)+1 & ")"
Looks like this in Excel:
SteerLockRange=(10,1,25)
When I save this as a txt file though, this is how it looks:
"SteerLockRange=(10,1,25)"
It added " at both ends, which is not good! You can see there are multiple instances of & used.. Confusingly, when there is just one instance of & such as:
="SteerLockSetting=" & ROUND(((((F138-F137)/(F139))-1)/2),0)
Resulting in Excel:
SteerLockSetting=12
And when saved as a txt file:
SteerLockSetting=12
Now it does NOT add the " " .. .. That is great, but in the first example I'd also want there to be no 'start' and 'end' "" ..
I sure hope there is a sollution. When I manually copy/paste the excel lines to a txt file, it works fine, never a "" too many.. Surely this must also be possible saving the excel file to a txt file?
Thanks (again! )
Niels
PS1: When saving files in excel using a macro, is there a way to stop it asking if I want to overwrite the file? I.e. let it overwrite by default?
PS2: When closing a new workbook, created in a macro, is there a way to close this newly created one without excel asking me if I want to save it?
Bookmarks