Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default ThisWorkbook.Saved = True does not work when Shapes().ControlFormat.Enabled = False

Hello -

I am trying to figure out why I cannot set the ThisWorkbook.Saved
values to True to avoid being prompted whether I want to save the
workbook upon exiting.

The code is doing the following ...

Workbook_Open()
Application.OnTime Now, "preProcess"
...

Public Sub preProcess()
If ThisWorkbook.ReadOnly Then

ThisWorkbook.Sheets("Sheet1").Shapes("Button1").Co ntrolFormat.Enabled =
False
ThisWorkbook.Saved = True
End If
...

If I open the file in read-only and close it without making any
changes, I get the "Do you want to save changes ..." message.

All I want to do is to disable the button when the file is read-only.
How can I tell Excel that it should not care whether the button has
changed?

I use Excel 11 (2003) SP2.

Thanks!
Joe

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
What's the best way to toggle between true and false in Excel? Hiall, My excel work involves a lot of toggling between true and false (booleantypes) ... and it's very repetitive... Is there a way to select a bunch ofcells, and press a key short-cu LunaMoon Excel Discussion (Misc queries) 9 July 29th 08 12:28 AM
Shapes.visible = false/true Ctech[_122_] Excel Programming 2 March 22nd 06 02:25 PM
Can I disable a macro in "Thisworkbook" with true or false? Husker87 Excel Programming 7 February 17th 06 02:15 AM
Enabled Property of Shapes? Joe HM Excel Programming 3 March 14th 05 07:18 PM
ThisWorkbook.Saved does not work! Niklas[_3_] Excel Programming 5 November 25th 03 01:26 PM


All times are GMT +1. The time now is 01:42 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"