All experts outthere help please..
I am trying to convert excel file to .CSV file(Commad delimeted). I build the scripts from the macro test it and works. But it wont work when embended into VB.
Here is sample of my code
On Error Resume Next
.
.
Set objectExl = GetObject(, "Excel.Application"
If Err.Number <> 0 Then
Set objectExl = CreateObject("Excel.application"
blnRunning = False
Else
blnRunning = True
End If
.
.
If objectExl.FileExists "C:\ExcelFile.xls" Then
objectExl.Workbooks.Open "C:\ExcelFile.Xls"
Sheet= objectExl.Activeworkbooks.sheets(1).Name
Set obWorkSheet = objectExl.Activeworkbooks.sheets(Sheet)
End If
objectExl.ActiveWorkBook.SaveAS FileName:="H:\yan\VB\bamtrack\amex092002.csv", FileFormat:=xlCSV, CreateBackup:=False
.
.
.
Please
Help
I am trying to convert excel file to .CSV file(Commad delimeted). I build the scripts from the macro test it and works. But it wont work when embended into VB.
Here is sample of my code
On Error Resume Next
.
.
Set objectExl = GetObject(, "Excel.Application"
If Err.Number <> 0 Then
Set objectExl = CreateObject("Excel.application"
blnRunning = False
Else
blnRunning = True
End If
.
.
If objectExl.FileExists "C:\ExcelFile.xls" Then
objectExl.Workbooks.Open "C:\ExcelFile.Xls"
Sheet= objectExl.Activeworkbooks.sheets(1).Name
Set obWorkSheet = objectExl.Activeworkbooks.sheets(Sheet)
End If
objectExl.ActiveWorkBook.SaveAS FileName:="H:\yan\VB\bamtrack\amex092002.csv", FileFormat:=xlCSV, CreateBackup:=False
.
.
.
Please
Help