Hello,
I am opening an Excel spreadsheet from Access 2007, and when I try to change the data in that spreadsheet, and save it, it tells me that it's in read-only mode, and I have to do a Save As and change the name.
Is there a way to open the spreadsheet in edit mode. Below is my code that I currently have working.
Any help would be greatly appreciated.
I am opening an Excel spreadsheet from Access 2007, and when I try to change the data in that spreadsheet, and save it, it tells me that it's in read-only mode, and I have to do a Save As and change the name.
Is there a way to open the spreadsheet in edit mode. Below is my code that I currently have working.
Code:
Dim xlApp As Excel.Application
Dim sht As Excel.Worksheet
Dim strFilename As String
strFilename = "Drive Letter:\Filename.xlsx"
Set xlApp = CreateObject("Excel.Application")
xlApp.Workbooks.Open (strFilename)
Set sht = xlApp.ActiveWorkbook.Sheets(1)
sht.Activate
xlApp.Application.Visible = True
Set xlApp = Nothing
Set sht = Nothing
Any help would be greatly appreciated.