ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   OPen excel workbook... (https://www.excelbanter.com/excel-programming/342711-open-excel-workbook.html)

[email protected]

OPen excel workbook...
 
I want to open an excel workbook as read-only and suppress any and all
user-prompt messages - How can I do this?

Here's what I have tried:
Set xlReportWkbk = Workbooks.Open(strPath & strReportWkbk, , xlReadOnly, , ,
, True, , , False, False)

But I still get prompted is the targeted workbook is already open...

Mike Q.

OPen excel workbook...
 
Sub ReadOnly()
Workbooks.Open Filename:="E:\EXCEL\MySpreadSheet.xls", ReadOnly:=True
End Sub
--
Mike Q.


" wrote:

I want to open an excel workbook as read-only and suppress any and all
user-prompt messages - How can I do this?

Here's what I have tried:
Set xlReportWkbk = Workbooks.Open(strPath & strReportWkbk, , xlReadOnly, , ,
, True, , , False, False)

But I still get prompted is the targeted workbook is already open...


[email protected]

OPen excel workbook...
 
That's the same thing I had before only you aren't catching the Workbook
object that is returned from the Open command.

"Mike Q." wrote:

Sub ReadOnly()
Workbooks.Open Filename:="E:\EXCEL\MySpreadSheet.xls", ReadOnly:=True
End Sub
--
Mike Q.


" wrote:

I want to open an excel workbook as read-only and suppress any and all
user-prompt messages - How can I do this?

Here's what I have tried:
Set xlReportWkbk = Workbooks.Open(strPath & strReportWkbk, , xlReadOnly, , ,
, True, , , False, False)

But I still get prompted is the targeted workbook is already open...



All times are GMT +1. The time now is 02:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com