I want to be able an Excel sheet and read the results in. I can do it when I hard code some information, but can't figure out how to allow the user to enter in the informtion.
I want the user to allow them to choose the file on this line.
App.Path & "\GENISYS_Roster_KieferC.xls;"
I tried to do the following and it didn't work:
mstrConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFileName & "Extended Properties=Excel 8.0;"
--------------------
and is there a way for them to be prompt for the workbook on this line?
SELECT * FROM [MASTER PG 1$]
Thank you..
Code:
cdbWordProc.Filter = "EXCEL (*.xls)|*.xls"
cdbWordProc.FilterIndex = 1
cdbWordProc.ShowOpen
strFileName = cdbWordProc.FileName
Text1 = strFileName
'Connect to Database ----->
mstrConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\GENISYS_Roster_KieferC.xls;" & _
"Extended Properties=Excel 8.0;"
dcexport.ConnectionString = mstrConnectionString
dcexport.Visible = False
dcexport.RecordSource = "SELECT * FROM [MASTER PG 1$] "
dcexport.Refresh
I want the user to allow them to choose the file on this line.
App.Path & "\GENISYS_Roster_KieferC.xls;"
I tried to do the following and it didn't work:
mstrConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strFileName & "Extended Properties=Excel 8.0;"
--------------------
and is there a way for them to be prompt for the workbook on this line?
SELECT * FROM [MASTER PG 1$]
Thank you..