VBS open readonly recommended doc

sjk136

New Member
Joined
Jan 3, 2011
Messages
7
Hi,

This code does what I want so far. It will open the Workbook I want, will make it visible, and will run the module that I've specified.

The problem that I have, is that the WB is saved with Read Only Recommended on, so when I open the WB with the below VB script, it opens it as read only, and wont let me save. I want it to open as read-write instead.

I saw the IgnoreReadOnlyRecommended argument in the .Open documentation, but don't know how to implement it into a VBS.

Any ideas?

VBS code so far
Code:
Dim xlApp 
Set xlApp = CreateObject("Excel.Application")

 With xlApp
 xlApp.Workbooks.Open "blah" 
 ''.IgnoreReadOnlyRecommended = True
 .Visible = True
 .Application.Run "modBlah"
 .Application.Quit
 End With
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
It shows me an Expected Statement Error at line 5 char 32 (the "filename" argument I think) I think it doesn't like that formatting.

I then changed the next line to the one following it.

Code:
xlApp.Workbooks.Open "blah" 
xlApp.Workbooks.Open Filename:="blah"
and it still didn't like it.
 
Upvote 0

Forum statistics

Threads
1,215,510
Messages
6,125,228
Members
449,216
Latest member
biglake87

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top