With CommonDialog1
.FileName = "*.xls"
.DialogTitle = "Select Excel file to open"
.Filter = "Excel files|(*.xls)"
.FilterIndex = 0
.InitDir = App.Path
.Flags = cdlOFNHideReadOnly
.ShowOpen
If .FileName = "*.xls" Then Exit Sub
End With
Set objworkbook = objexeclfile.Workbooks.Open(CommonDialog1.FileName)
Set objimportsheet = objworkbook.Sheets(1)引用了
Microsoft Excel 11.0 Object Library组件,现在的问题是Excel2003导入没问题,但是2007就找不到此文件,请问该怎么解决?
好象Excel2007对应 Microsoft Excel 12.0 Object Library