Ik zou graag met een code een Excelsheet willen opstarten.Hoe krijg ik dat voor elkaar?
Hieronder de foutmelding:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim xlApp As Excel.Application
Dim xlSheet As Excel.Worksheet
xlApp = CreateObject("Excel.Application")
xlSheet = xlApp.xlSheet.Open("c:\Afdracht garage.xls", , True)
xlSheet.Application.Visible = True
End Sub
Als ik op de button klik wordt> xlSheet = xlApp.xlSheet.Open("c:\Afdracht garage.xls", , True) geel met de onderstaande
foutmelding>
An unhandled exception of type 'System.MissingMemberException' occurred in microsoft.visualbasic.dll
Additional information: Public member 'xlSheet' on type 'Application' not found.
Wat doe ik fout?
infopatin@hetnet.nl
Hieronder de foutmelding:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim xlApp As Excel.Application
Dim xlSheet As Excel.Worksheet
xlApp = CreateObject("Excel.Application")
xlSheet = xlApp.xlSheet.Open("c:\Afdracht garage.xls", , True)
xlSheet.Application.Visible = True
End Sub
Als ik op de button klik wordt> xlSheet = xlApp.xlSheet.Open("c:\Afdracht garage.xls", , True) geel met de onderstaande
foutmelding>
An unhandled exception of type 'System.MissingMemberException' occurred in microsoft.visualbasic.dll
Additional information: Public member 'xlSheet' on type 'Application' not found.
Wat doe ik fout?
infopatin@hetnet.nl