LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Prompt before saving

Hello all,

Need help in the following:

I want the user to enter an ACCOUNT CODE in a workbook BEFORE they
can save it. That is, whenever the user clicks on the SAVE button
or clicks on File save, the system must check if ACCOUNT CODE is
present in the specified cell, otherwise it should prompt the user
input the account code first before saving.
I checked the VB-Help and the code it showed is a PRIVATE FUNCTION.
I cannot use it in its present form.

Private Sub App_WorkbookBeforeSave(ByVal Wb As Workbook, _
ByVal SaveAsUI As Boolean, Cancel as Boolean)
a = MsgBox("Do you really want to save the workbook?", vbYesNo)
If a = vbNo Then Cancel = True
End Sub

(by the way, when can we use PRIVATE FUNCTIONS??)

Any suggestions ???

Many thanks/Cheers.
cskg

--
Message posted from http://www.ExcelForum.com

 
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
Turn off XML prompt when saving Excel files Food Snobber Excel Discussion (Misc queries) 0 February 11th 09 02:17 AM
Turn off XML prompt when saving Excel files Food Snobber Excel Discussion (Misc queries) 0 February 11th 09 02:16 AM
no prompt for saving after making changes Dan S Excel Discussion (Misc queries) 1 February 10th 07 07:01 AM
How do I get rid of prompt when saving Excel spreadsheet ? gabriolaislander Excel Discussion (Misc queries) 1 August 10th 06 08:37 PM
prompt when saving as .txt (Tab delimited) format? Brian McCullough Excel Programming 2 November 19th 03 02:08 AM


All times are GMT +1. The time now is 09:57 PM.

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

About Us

"It's about Microsoft Excel"