Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Message Box before Save


I have a specific template that I fill out for certain requests. When
hit “SAVE AS”, is there a way to create a message box that says, "Di
you review the market code" and then provides a check box that say
"no" or "yes". If it you click "yes," then the workbook could be saved
if you click "no" it would give you the opportunity to review your work
and do SAVE AS again. I only need this for one specific template; i
only needs to be saved there, not in the personal.xls. A message bo
like this would really help cut down on the errors as we have 7
variables and many of them differ only by one character.

I have a basic understanding of VBA code, SQL and macros. If anyon
could help me, I would appreciate it.


Thank

--
kajer
-----------------------------------------------------------------------
kajero's Profile: http://www.excelforum.com/member.php...fo&userid=3739
View this thread: http://www.excelforum.com/showthread.php?threadid=57077

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 324
Default Message Box before Save

How about a command button labeled "Save As" or whatever. The msgbox could
come up first and, if answered "Yes" then an inputbox could come up to allow
the "SaveAs" specs. The code following would then do the save.
--
Best wishes,

Jim


"kajero" wrote:


I have a specific template that I fill out for certain requests. When I
hit €śSAVE AS€ť, is there a way to create a message box that says, "Did
you review the market code" and then provides a check box that says
"no" or "yes". If it you click "yes," then the workbook could be saved,
if you click "no" it would give you the opportunity to review your work,
and do SAVE AS again. I only need this for one specific template; it
only needs to be saved there, not in the personal.xls. A message box
like this would really help cut down on the errors as we have 72
variables and many of them differ only by one character.

I have a basic understanding of VBA code, SQL and macros. If anyone
could help me, I would appreciate it.


Thanks


--
kajero
------------------------------------------------------------------------
kajero's Profile: http://www.excelforum.com/member.php...o&userid=37397
View this thread: http://www.excelforum.com/showthread...hreadid=570776


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Message Box before Save

You could do it in the BeforeSave event.

See Chip Pearson's page on events for an overview

http://www.cpearson.com/excel/events.htm

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim ans as Long
ans = MsgBox("Did you review the market code", vbYesNo)
if ans = vbNo then
msgbox "Please review the market code"
cancel = true
exit sub
end if
End Sub

--
Regards,
Tom Ogilvy

"kajero" wrote:


I have a specific template that I fill out for certain requests. When I
hit €śSAVE AS€ť, is there a way to create a message box that says, "Did
you review the market code" and then provides a check box that says
"no" or "yes". If it you click "yes," then the workbook could be saved,
if you click "no" it would give you the opportunity to review your work,
and do SAVE AS again. I only need this for one specific template; it
only needs to be saved there, not in the personal.xls. A message box
like this would really help cut down on the errors as we have 72
variables and many of them differ only by one character.

I have a basic understanding of VBA code, SQL and macros. If anyone
could help me, I would appreciate it.


Thanks


--
kajero
------------------------------------------------------------------------
kajero's Profile: http://www.excelforum.com/member.php...o&userid=37397
View this thread: http://www.excelforum.com/showthread...hreadid=570776


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
Macro to Save without the Save Message Ellen G Excel Discussion (Misc queries) 4 February 23rd 07 08:52 PM
Save Message maperalia Excel Programming 2 August 29th 05 06:51 AM
Message box before save Chance224 Excel Programming 1 March 15th 05 05:25 PM
save as error message gavmer[_28_] Excel Programming 2 June 1st 04 09:40 AM
How to save file without the save message? Together[_3_] Excel Programming 5 March 1st 04 04:41 PM


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