Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > VBA / Office Integration > Word, PowerPoint, Outlook, and Other Office Products > stopping a save command


Reply
 
Thread Tools Display Modes
  #1  
Old 07-08-2003, 09:25 AM
sl8rz's Avatar
sl8rz sl8rz is offline
Contributor
 
Join Date: May 2002
Location: The Rocky Mountains (UT)
Posts: 435
Default stopping a save command


I need to force a save from my VBA code but want to give the user the option of choosing "cancel" from the save box. Right now the code "Me.Save" runs just fine causing the save box to appear. However, since the document has never been given a name (it's from a template) an error will occur if the user clicks "cancel." I need to be able to halt the "Me.Save" command at that point and just dump the document altogether. Any ideas?

Thanks in advance.
__________________
SPOOOOON!!!!!
Reply With Quote
  #2  
Old 07-09-2003, 12:22 AM
zws zws is offline
Newcomer
 
Join Date: Jul 2003
Posts: 2
Default

You might try inserting a line that reads;

Do while me.save
if me.save = active
then msgbox vbOkCancel
if msgbox = OK then
me.save = true
else
if msgbox = cancel then
me.save = false

or something along those lines. Hope it helps.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Command Line Statements ?? Cisco_Kid_23 General 5 07-01-2003 02:21 AM
HELP ME with SaveAs command astral_boi General 4 03-14-2003 10:51 AM
Stopping do you want to save question and do you want to empty clipboard? brucect17 Word, PowerPoint, Outlook, and Other Office Products 3 12-17-2002 07:53 AM
wave record and save jogregory General 2 08-12-2002 07:35 AM
COMMON DIALOG - save, open, filetypes, etc... UseTheMan General 1 05-23-2001 11:08 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->