Disable prompt

Noz2k

Well-known Member
Joined
Mar 15, 2011
Messages
693
I currently have a macro set up which before performing any calculations first updates the information with data from another workbook. However when it does this is brings up a prompt which asks for confirmation that you want to update.

Is it possible so disable this prompt and just automatically update?

I know I can change my options so that the prompt is not shown on my computer, however I am not designing it for myself, and I don't wish to disable the prompt for all workbooks, just in this instance.
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Try this

Code:
Application.DisplayAlerts = False
'
'code that generates a message
'
Application.DisplayAlerts = True
 
Upvote 0
Thank VoG, I already have that in my code and it doesn't seem to be making a difference?

Rich (BB code):
Application.DisplayAlerts = False
Application.Workbooks.Open ("\\Filelocation/xlsx")
Workbooks("Log10").Sheets("Data").Name = "Sheet50"
Workbooks("LogData").Sheets("Data").Copy Before:=Workbooks("Log10").Sheets("Sheet50")
Workbooks("Log10").Sheets("Sheet50").Activate
Sheets("sheet50").Visible = xlSheetVisible
Sheets("Sheet50").Delete
Workbooks("LogData").Close
Application.DisplayAlerts = True

Have tried entering the line Application.DisplayAlerts = False in the immediate window but it still has no affect and the prompt is shown
 
Last edited:
Upvote 0
So I added the line

Code:
Application.AskToUpdateLinks = False

and this seems to have eliminated the prompt
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,239
Members
452,898
Latest member
Capolavoro009

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top