Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 25th, 2005, 03:05 AM
Authorized User
Join Date: Jan 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default suppressing system message???


need some expert help. i am open an excel file with a simple link as "<a ="file:///c:/inetpub/wwwroot/test.xls">"

no problem with this.
it opens in the same window (same explorer window) as my asp form is. This is what i want so this is not the problem!
What happens is that when i open the excel workbook i have some data being retrieved from the database and later when the user inputs some values inside it and clicks button "SAVE" inside it i will save it in the database directly thru vba code.

when i simply click the link and open the workbook and i click back button it gives an informative message as:
"the document has been modified.Do u want to save the changesHg
yes: save your changes
no: discard your changes
cancel: keep this document open.

i simple want to supress this error message?? how can i do that?
i am using asp as the web langeuage

thanks a lot
Old June 4th, 2007, 08:44 PM
Registered User
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts


Please let me know when you get the answer

I have the same problem. I dont want the users to have that question. it is already done at the back end.

Thanks a lot in advance

Captain Jack Sparrow
Old June 5th, 2007, 01:49 PM
Friend of Wrox
Join Date: Feb 2007
Posts: 163
Thanks: 0
Thanked 2 Times in 2 Posts

Personally whenever you retrieve data, I'd do "ThisWorkbook.Saved = True" as the last command... but it sounds like it loads table data at open. If this isn't a routine that you can insert a command into, try putting this routine in the ThisWorkbook object module:
Private Sub Workbook_BeforeClose(Cancel As Boolean)

'Makes the application think that changes to the workbook have been 'saved' just before closing.
  ThisWorkbook.Saved = True

End Sub

Be careful where you set this... the prompt for save after changes feature is to protect the user from loss of data which can equate to hours of work.

Hope this helps.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Suppressing Data Pankaj C XSLT 12 October 23rd, 2007 06:44 AM
supress system (sqlserver) message starnet SQL Server 2000 1 July 28th, 2006 04:34 AM
Suppressing login KiwiMark .NET Framework 2.0 0 June 13th, 2006 10:58 PM
problem with system message vubinhsg BOOK: Access 2003 VBA Programmer's Reference 6 July 30th, 2004 01:20 AM
Get message from system "print" dialog box pavel Pro VB 6 0 August 28th, 2003 09:31 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.