i have this app that opens Excel
spreadsheets in an MSFlexGrid (a control similar to
a DataGrid). The only problem I am having is that
i want the default Excel worksheet to open. With my
code I have to tell it to open the worksheet. Any ideas?
I am using an MSFlexGrid, Data control and CommmonDialog control.
i already changed the Data1.connect property
Any Help is much appreciated!!
Heres the code:
CommonDialog1.Filter = "All files|*"
CommonDialog1.ShowOpen
If CommonDialog.FileName <> "" Then
Data1.DatabaseName = CommonDialog1.FileName
Data1.RecordSource = "Sheet1" ' NOTE: This is the problem line
Data1.Refresh
End If
The Data1.RecordSource line should open the default, leaving it
out opens nothing. This is possible because I read it in a book a long time ago.
spreadsheets in an MSFlexGrid (a control similar to
a DataGrid). The only problem I am having is that
i want the default Excel worksheet to open. With my
code I have to tell it to open the worksheet. Any ideas?
I am using an MSFlexGrid, Data control and CommmonDialog control.
i already changed the Data1.connect property
Any Help is much appreciated!!
Heres the code:
CommonDialog1.Filter = "All files|*"
CommonDialog1.ShowOpen
If CommonDialog.FileName <> "" Then
Data1.DatabaseName = CommonDialog1.FileName
Data1.RecordSource = "Sheet1" ' NOTE: This is the problem line
Data1.Refresh
End If
The Data1.RecordSource line should open the default, leaving it
out opens nothing. This is possible because I read it in a book a long time ago.