Im new whith vb6, i onley now de basic of it.
but i have a problem with excel.
I opend and existing excel file with vb6 in a private sub.
Dim xlApp As Excel.Application 'Nodig voor werken met excel
Set xlApp = New Excel.Application 'excel openen
xlApp.Visible = True
xlApp.Workbooks.Open (App.Path & "\gegevens.xls")
i = 0
List1.Clear
Do
i = i + 1
vgl = xlApp.ActiveSheet.Cells(i, 1)
If vgl <> "" Then
List1.AddItem vgl
End If
Loop While vgl <> ""
and i want to close the file in an other private sub.
dis doesn't work and i don't now what im doing rwong???
this is the code,
Dim xlApp As New Excel.Application
Windows("gegevens.xls").Activate
ActiveWorkbook.Close savechanges:=True
xlApp.Quit
End
can somone help me please.
thanx