read-only error

shanec7401

New Member
Joined
May 9, 2011
Messages
9
Hi all, this is probably a pretty dumb query but going to ask anyway.
I have a live file that is updated at a particular PC. There are several macros running on this file. However, I want it available to view as read-only from any other PC also. When I open as read-only (after enabling macros), a message pops up stating "file already exists in this location. Do you want to replace it". Obviously click No here but then it pops up a visual basic error. This error is caused by script that is running which saves data after every entry

Private Sub Workbook_Open()
ActiveWorkbook.Save
ActiveWindow.LargeScroll Down:=-1
End Sub

What I want to know is, is there any code I can use so that when opened in read-only it doesnt try to save.

thanks for any help
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,224,525
Messages
6,179,319
Members
452,905
Latest member
deadwings

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