Wrox Programmer Forums
|
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 October 17th, 2006, 08:15 PM
Authorized User
 
Join Date: Nov 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Save without replace

Hello
I am using excel 2003 and have created a worksheet with macros which allow users to enter data for a period of time. When the period has finished they click a button which validates the data and updates a sql server database. Then we go thru a process of saving a copy of the workbook on a network drive (workbook saveas), clear the relevant cells and prepares it for the next period and then save the workbook back in the original folder for the next period.
I save the workbook using saveas again but this time using the original filename captured earlier but i dont want the user to be prompted to replace the file. How do i stop this prompt from appearing???

Any ideas/suggestions

Thanks

GuyB

 
Old October 17th, 2006, 11:41 PM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Set the display alerts to False. This will stop the prompts

Application.DisplayAlerts = False

' Your Save Code here

' Reset the Alerts
Application.DisplayAlerts = True


http://www.vbadud.blogspot.com
 
Old October 18th, 2006, 06:00 PM
Authorized User
 
Join Date: Nov 2005
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks

worked like a charm

GuyB






Similar Threads
Thread Thread Starter Forum Replies Last Post
replace ' and " with \' and \" Brian Campbell XSLT 4 May 24th, 2006 10:49 AM
replace "." with "/" thelos Excel VBA 1 September 14th, 2005 10:47 AM
Replace crmpicco VB How-To 15 May 20th, 2005 01:34 PM
replace() Missy_K Javascript 1 January 16th, 2004 11:17 AM
Replace . by , Lukas C# 1 October 24th, 2003 10:44 PM





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