Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Exit Sub if Read-Only

Posted on 2014-08-14
2
Medium Priority
?
206 Views
Last Modified: 2014-08-14
Hi,

I need a line of code that tests to see whether the workbook is Read only, if it is, then it exits the sub

Thanks
0
Comment
Question by:Seamus2626
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 40260456
Workbooks have a ReadOnly property. Try checking that.

e.g.

If ActiveWorkbook.ReadOnly Then
    Exit Sub
End If

Open in new window

0
 

Author Closing Comment

by:Seamus2626
ID: 40260565
Thanks!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft's Excel has many features that most people will never need nor take advantage of.  Conditional formatting is one feature that you may find a necessity once you start using it.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question