I've reviewed the posts for something similar but have been unable to find anything. I have the following code snip...
Dim xlApp As Object
Dim ObjWorkbook As Object
Dim ObjWorksheet As Object
Set xlApp = CreateObject("Excel.Application")
xlApp.Application.DisplayAlerts = False
set ObjWorkbook = xlApp.Workbooks.Open ("S:\Dan\folder\file.xls")
xlApp.Visible = True
Set objWorksheet = xlApp.Sheets("sheet1")
The file "S:\Dan\folder\file.xls" is saved as a password protected file and I want to open a "Read Only" version. In VBA, I know how to do this as...
Workbooks.Open Filename:="s:\Dan\folder\file.xls", _ReadOnly:=True
Set shSheet = Worksheets("Sheet1")
How can I open this file as a read only type? What is the correct syntax?
Dim xlApp As Object
Dim ObjWorkbook As Object
Dim ObjWorksheet As Object
Set xlApp = CreateObject("Excel.Application")
xlApp.Application.DisplayAlerts = False
set ObjWorkbook = xlApp.Workbooks.Open ("S:\Dan\folder\file.xls")
xlApp.Visible = True
Set objWorksheet = xlApp.Sheets("sheet1")
The file "S:\Dan\folder\file.xls" is saved as a password protected file and I want to open a "Read Only" version. In VBA, I know how to do this as...
Workbooks.Open Filename:="s:\Dan\folder\file.xls", _ReadOnly:=True
Set shSheet = Worksheets("Sheet1")
How can I open this file as a read only type? What is the correct syntax?