Hi every one
i have a question about saving some data i have in a list box
what i have done is i cane save the data to a text file with this code.
VB Code:
Public Sub mnuSaveOutput_Click() Dim filename As String Dim i As Integer cdiaSaveOutput.Filter = "Text files (*.txt)|*.txt" cdiaSaveOutput.FilterIndex = 1 cdiaSaveOutput.ShowSave filename = cdiaSaveOutput.filename ' If (Len(filename) > 0) Then Open filename For Output As #1 For i = 0 To lstOutput.ListCount - 1 Print #1, lstOutput.List(i) Next i Close #1 End If End Sub
what i want to know is how to save it to an excel file.
the data that im saving is like this.
NATURAL LIGHT TABLES FOR THE SUN AND MOON
Location: YQK KENORA ONT
Latitude : 49 Deg 47 Min N
Longitude: 094 Deg 22 Min W
Date : Jul, 2006
ALL TIMES ARE UTC (ZULU)
Date Morning Twilight Evening Twilight Sun Moon % Moon
Astro Naut Civil Civil Naut Astro Rise Set Total Rise Set Illum
------ ----------------- ----------------- ----------------- ----------- ------
SAT 1 99:99 08:29 09:31 03:11 04:14 99:99 10:15 02:28 16:13 16:29 05:16 25
SUN 2 99:99 08:30 09:32 03:11 04:13 99:99 10:15 02:27 16:12 17:37 05:28 34
MON 3 99:99 08:31 09:33 03:10 04:12 99:99 10:16 02:27 16:11 18:44 05:39 43
TUE 4 99:99 08:32 09:34 03:10 04:12 99:99 10:17 02:27 16:09 19:54 05:51 52
WED 5 99:99 08:34 09:35 03:09 04:11 99:99 10:18 02:26 16:08 21:07 06:05 62
THU 6 99:99 08:35 09:36 03:09 04:10 99:99 10:18 02:26 16:07 22:23 06:22 71
hope some one can help me
thanks ed


Reply With Quote
