Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hope someone can help, as is usually the case I'm probably missing
something really obvious! I have a button on a form that I want to save the last contents of the current workbook to a specific name as follows... Private Sub cbEnd_Click() Dim fname As String fname = "Last end status" ActiveWorkbook.SaveAs Filename:=fname, ConflictResolution:=xlLocalSessionChanges Unload Me End Sub I have another subroutine, part of which does exactly the same thing but at specific periods as data changes... fname = "Status at" + Str(vaNextClock) + " secs" vaCurrClock = vaCurrClock Mod 5 vaNextClock = vaNextClock Mod 5 If vaCurrClock < vaNextClock And vaNextClock = 0 Then ActiveWorkbook.SaveAs Filename:=fname, ConflictResolution:=xlLocalSessionChanges End If My issue is that the second piece of code works fine but the first piece always shows the confirm dialog box, does anyone have any idea why? Or even better how to force the overwite? Thanks in advance Peter |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Range-name Behaviour | Excel Discussion (Misc queries) | |||
Strange if(***) behaviour? | Excel Discussion (Misc queries) | |||
Strange behaviour | Excel Worksheet Functions | |||
Behaviour of Save as and Displayalerts | Excel Programming | |||
Key behaviour | Excel Programming |