DisplayAlerts
Jun 20, 2008
I have this Excel form (actually worksheet designed as a form, selectable from our Intranet) which will be filled in by the first user and then approved by two more people downstream. I need to preserve the data throughout, including the approvals, so that the end form reaches the executing operative fully completed (initial data and both approvals).
I elected to Save the form using a SaveAs statement and change filename, so that the initial empty template remains empty for anyone else starting this process. That saving process issues a message about "filename already exists. Do you wish to replace...etc..etc." every time the form is e-mailed.
To eliminate the alerts, I bracketed the SaveAs with disabling and re-enabling the DisplayAlerts. Unfortunately, they resulted in a runtime 400 error. Eliminating the DisplayAlerts lines (bolded below) makes the routine run as intended, but it restores the need of responding to a message every time.
Is there something I could to to achieve no alerts and no runtime error?
The code of the e-mailing routine starts as follows:
Sub EMailer()
Dim OutApp As Object
Dim OutMail As Object
Dim OutMsg As String
Dim Copyto As String
Application.DisplayAlerts = False
ThisWorkbook.SaveAs "My_POReq.xls"
Application.DisplayAlerts = True
View 9 Replies
Jan 14, 2010
I am trying to suppress the message box displayed while executing the macro.
View 2 Replies
View Related
Dec 28, 2008
i use this to refresh webdata and copy cells:
Sub refreshAllQueries()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
On Error Resume Next
Dim qryTable As ClsModQt
For Each qryTable In QueryTableListeners
If Not qryTable.qtQueryTable.Refreshing Then
qryTable.forceRefresh
DoEvents
Dim a As Long
i thought the 'application.displayalerts = false' would stop the pop up box that says something like ' this webquery returned no data,blah, blah' but it does not. trouble is it freezes the sheet until i click ok, but i want to be able to leave unattended. i have posted this before, but not with this code.
View 9 Replies
View Related
Jul 14, 2006
Im copying and pasting data from one workbook to another but when I want to close the source workbook, it comes up with this message that I have much data and if I want to keep this in a clipboard. I thought I could disable this with Application.DisplayAlerts = False but when I do this, Excel freezes. Im I doing something wrong. How can I supress this window?
Public path As String
Sub Get_data()
path = "\Nlchoosa.nlOPS_Processes$OPS_ProcessesReports Sector performance"
Workbooks.Open Filename:=path & "ReportsSector Performance Reporting week.xls"
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.copy
Windows("Sector Performance report Week.xls").Activate
ActiveSheet.Paste
Application.DisplayClipboardWindow = False
Windows("Sector Performance Reporting week.xls").Activate
Application.DisplayAlerts = False
End Sub
View 6 Replies
View Related