View Full Version : Help exporting values to text file

09-19-2011, 03:49 PM
Hi, I need some help with exporting values to a .txt file. I need to be able to export ( name, x, y , z , 1). X Y Z are being calculated in a for loop so I would need to write into the text time every time the calculation is done until the loop is done. I am clueless on how to do this. Does anyone have sample code that illustrates something like this?


09-19-2011, 04:00 PM
The code im trying to do is here

Dim N As Integer, i As Integer, Xi As Double, Yi As Double, Zi As Double
N = 20
i = 0
For i = 0 To N

Zi = (KOP * i) / N
Xi = Xsurf
Yi = Ysurf
I would want the write code here
Next i

Xi and Yi are constants and shouldnt change. Zi should change 20 times.