Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default DisplayAlerts = false not working

I made my workbook read only so that users cannot select the chart on a
chart sheet. Now when I open my workbook it displays a message:

'Workbook should be opened as read only unless you intend to save changes to
it. Open as read only?'

I put Application.DisplayAlerts = False in the OnOpen code first line but it
wont go away. Does anyone know how to get rid of it ?

Any help much appreciated, kind regards, Mark


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default DisplayAlerts = false not working

The code in your procedures run after the workbook is opened--so it's already
too late.

Mark Stephens wrote:

I made my workbook read only so that users cannot select the chart on a
chart sheet. Now when I open my workbook it displays a message:

'Workbook should be opened as read only unless you intend to save changes to
it. Open as read only?'

I put Application.DisplayAlerts = False in the OnOpen code first line but it
wont go away. Does anyone know how to get rid of it ?

Any help much appreciated, kind regards, Mark


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 77
Default DisplayAlerts = false not working

Hi

One way around it is to use another workbook to open your read only
workbook.

Use code like this in another blank workbook that does nothing but open your
read-only workbook.

Private Sub Workbook_Open()
Application.DisplayAlerts = False
Workbooks.Open "your_workbooks_name.xls"
End Sub


HTH

Ken


  #4   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default DisplayAlerts = false not working

You could use ChangeFileAccess method in your OnOpen statement to change the
file to readonly after its opened.

ThisWorkBook.ChangeFileAccess Mode:=xlreadonly

Of course, your users could get around this by holding the Shift key when
they open the file (causing auto open macros to not run), but they can also
get around read only using Save As to save a copy of the file w/o the read
only property set.

Whatever method you use, just be sure you know how to open the file
read/write.


"Mark Stephens" wrote:

I made my workbook read only so that users cannot select the chart on a
chart sheet. Now when I open my workbook it displays a message:

'Workbook should be opened as read only unless you intend to save changes to
it. Open as read only?'

I put Application.DisplayAlerts = False in the OnOpen code first line but it
wont go away. Does anyone know how to get rid of it ?

Any help much appreciated, kind regards, Mark



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default DisplayAlerts = false not working

Thanks for that, good workaround,

rgd, Mark


"Ken Macksey" wrote in message
...
Hi

One way around it is to use another workbook to open your read only
workbook.

Use code like this in another blank workbook that does nothing but open
your read-only workbook.

Private Sub Workbook_Open()
Application.DisplayAlerts = False
Workbooks.Open "your_workbooks_name.xls"
End Sub


HTH

Ken




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DisplayAlerts and ScreenUpdate will not set to False Joe at Baso New Users to Excel 1 April 5th 05 07:41 PM
DisplayAlerts = False fails Jerry Excel Programming 1 December 15th 04 09:09 AM
Can't Set DisplayAlerts to False Mark Driscol Excel Programming 0 April 7th 04 06:11 PM
Can't Set DisplayAlerts to False Mark Driscol Excel Programming 1 April 6th 04 10:45 PM
Can't Set DisplayAlerts to False Mark Driscol Excel Programming 2 April 2nd 04 12:28 PM


All times are GMT +1. The time now is 11:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"