Message 1 of 2
File does not Open

Not applicable
03-15-2009
01:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, To Every One
I am selecting the excel file but the file does not open can u tell me where is the mistake.
thanks
Public Sub GetFiles()
Dim Files As Variant
Dim fName As String
Dim excelApp As Excel.Application
Dim wbkobj As Excel.Workbooks
Dim TxtCharacter
Dim Excelobj As Object
On Error Resume Next
Const iTitle = "My Open Dialogue"
Const FilterList = "*.xls,*.xls"
Set Excelobj = GetObject(, "Excel.Application")
Files = Excel.Application.GetOpenFilename(Title:=iTitle, filefilter:=FilterList, filterindex:=1, MultiSelect:=True)
Excelobj.Visible = True
Set wbkobj = excelApp.Workbooks.Open(Files)
End Sub
I am selecting the excel file but the file does not open can u tell me where is the mistake.
thanks
Public Sub GetFiles()
Dim Files As Variant
Dim fName As String
Dim excelApp As Excel.Application
Dim wbkobj As Excel.Workbooks
Dim TxtCharacter
Dim Excelobj As Object
On Error Resume Next
Const iTitle = "My Open Dialogue"
Const FilterList = "*.xls,*.xls"
Set Excelobj = GetObject(, "Excel.Application")
Files = Excel.Application.GetOpenFilename(Title:=iTitle, filefilter:=FilterList, filterindex:=1, MultiSelect:=True)
Excelobj.Visible = True
Set wbkobj = excelApp.Workbooks.Open(Files)
End Sub