1
1tsols
Hello, I am new to this forum, so hello to everyone, nice to be here!
I have a project that I am developing in Visual Basic 6 and part of the
project requires opening, modifying and close a excel spreadsheet. I
have the code and in general works fine and without problems.
However one problem has arisen, when I try and open a excel spreadsheet
that is in a folder that contains a space in the folder name, it won't
open the spreadsheet. I have included the code below
Code:
--------------------
Dim oExcel As New Excel.Application
Dim oWorkBook As Excel.Workbook
' before we can do anything, we need to check the excel file exists
If IsFile(sExcelFile) Then
' excel file exists, proceed and open it
oExcel.Workbooks.Open FileName:=sExcelFile
' do what i have to do.......
oExcel.ActiveWorkbook.Save
oExcel.Quit
End If
I have a project that I am developing in Visual Basic 6 and part of the
project requires opening, modifying and close a excel spreadsheet. I
have the code and in general works fine and without problems.
However one problem has arisen, when I try and open a excel spreadsheet
that is in a folder that contains a space in the folder name, it won't
open the spreadsheet. I have included the code below
Code:
--------------------
Dim oExcel As New Excel.Application
Dim oWorkBook As Excel.Workbook
' before we can do anything, we need to check the excel file exists
If IsFile(sExcelFile) Then
' excel file exists, proceed and open it
oExcel.Workbooks.Open FileName:=sExcelFile
' do what i have to do.......
oExcel.ActiveWorkbook.Save
oExcel.Quit
End If