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 Message Box


So far so good, I just have one more (probably many more) conundrum to
solve.
The code below, supplied via this site, works perfectly. But I have to
make allowance for users requesting via command button the creation of
a new book twice in one day. Conflicting file name. By default I get
the windows File already exists prompt. How can I control this so that
i can direct the navigation if 'No' is selected.

Thanks again



Sub CreateArchive()

Dim Wb As Workbook
Dim ws As Worksheet
Dim sStr As String

Application.ScreenUpdating = True

Set Wb = Workbooks("Single Sheet.xls")
Set ws = Worksheets("Master")
sStr = Format(Date, "yymmdd") & " " & "Stage Clearer"

ws.Copy

ActiveWorkbook.SaveAs "G:\" & sStr

ActiveWorkbook.Close
Application.ScreenUpdating = False

End Sub


--
Kstalker
------------------------------------------------------------------------
Kstalker's Profile: http://www.excelforum.com/member.php...o&userid=24699
View this thread: http://www.excelforum.com/showthread...hreadid=384216

 
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
message box Hein Excel Discussion (Misc queries) 2 October 21st 08 07:10 AM
Message Box Wayne Excel Discussion (Misc queries) 2 April 9th 07 12:10 PM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM
message box Myriam Excel Programming 4 November 29th 04 11:49 PM
Displaying a message in a message box without requiring user to click anything to proceed Android[_2_] Excel Programming 2 June 25th 04 06:44 PM


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