Ago
10-25-2010, 01:00 AM
I have a csvfile where the user saves his settings for the macro.
The settings are
Altitude: Meter or Feet
Velocity: Km/h, M/s, Mph or feet/s
I can read and write to the file, but i cant figure out how to know if its corrupt or not.
The two settings are V(0) and V(1)
If V(0) <> "Meter" Or V(0) <> "Feet" Then
MsgBox "The Flysight settings file is corrupt, please delete it and open this file again"
Exit Sub
End If
If V(1) <> "Km/h" Or V(1) <> "M/s" Or V(1) <> "Mph" Or V(1) <> "Feet/s" Then
MsgBox "The Flysight settings file is corrupt, please delete it and open this file again"
Exit Sub
End If
The first if works (Meter/Feet) but V(1) does not.
When i hover the mouse on V(1) i see the value is "Km/h", if i add a watch and look at the value there it says "Km/h ".
What is that <Space>? A normal space does not work.
The settings are
Altitude: Meter or Feet
Velocity: Km/h, M/s, Mph or feet/s
I can read and write to the file, but i cant figure out how to know if its corrupt or not.
The two settings are V(0) and V(1)
If V(0) <> "Meter" Or V(0) <> "Feet" Then
MsgBox "The Flysight settings file is corrupt, please delete it and open this file again"
Exit Sub
End If
If V(1) <> "Km/h" Or V(1) <> "M/s" Or V(1) <> "Mph" Or V(1) <> "Feet/s" Then
MsgBox "The Flysight settings file is corrupt, please delete it and open this file again"
Exit Sub
End If
The first if works (Meter/Feet) but V(1) does not.
When i hover the mouse on V(1) i see the value is "Km/h", if i add a watch and look at the value there it says "Km/h ".
What is that <Space>? A normal space does not work.