Suppressing dialog boxes
I am not sure you can use:
Application.DisplayAlerts = False
Then, at a point when the cut and paste is finished:
Application.DisplayAlerts = True
It is difficult to analyze without the code being posted.
"Sian" wrote:
I see I didn't explain myself very well (well, it is Friday pm!!). I don't
want the dialog box to appear at all - at the moment the user has to sit
there clicking "Yes" 20 times
"JLGWhiz" wrote:
This produces a message box with your question in it. If the user clicks Yes
then
the code continues as currently written. If the user clicks No then code
that you have yet to compose will execute to change the name of whatever it
is the user is working with and then continue with currently written code.
Msg = "A formula or sheet you want to move or copy contains the name
'Parnerlist'
which already exists on the destination worksheet. Do you want to use this
version of the name?"
doWhat = MsgBox(Msg, vbYesNo + vbQuestion, "MAKE A CHOICE")
If doWhat = vbYes Then
'Do nothing
Else
'Code to change name
End If
"Sian" wrote:
My Excel macro at several points performs some cut'n'pasting, and the dialog
box appears :
"A formula or sheet you want to move or copy contains the name 'Parnerlist'
which already exists on the destination worksheet. Do you want to use this
version of the name?"
I want the macro to accept a "Yes" programatically and carry on working.
I'm sure there's an easy answer but I haven't found it. Can anyone help?
|