Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
message box | Excel Discussion (Misc queries) | |||
Message Box | Excel Discussion (Misc queries) | |||
changing the message in an error message | Excel Worksheet Functions | |||
message box | Excel Programming | |||
Displaying a message in a message box without requiring user to click anything to proceed | Excel Programming |