Disable cell updated when changing file reference in a cell

DrMundo

New Member
Joined
Aug 6, 2013
Messages
10
Hello all. Happy Wednesday.

So I have a sheet with many references to various files throughout our network. I also have in place a macro which finds and replaces the file names in the cells every month. This, however, becomes a problem when I am trying to proactively update the cell references and the file which excel is trying to look up does not yet exist. A window pops up which requires me to click 'cancel' for each "find and replace" that the macro attempts, which takes quite a long time. So basically, I need a way to either disable to popup (displayalerts = false has not done the trick for me) and allow the macro to run to completion, or I need a way for excel to temporarily stop caring that the file which it is trying to look up does not exist. The latter sounds more appealing to me, as this macro takes a very long time to run and I think it is because excel is looking up so many different files.

Any help is greatly appreciated.

Thanks
DM
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
there are two ways of doing this, i think, one is quick & dirty, the other is the proper way:

Quick & Dirty:
Code:
On Error resume Next
'your code to open the file and change the cell
On Error goto 0

Proper way:
Code:
Dim wbChng as workbook
On Error Resume Next
   Set wbChng = Workbooks.Open("YourXL.XLS")
On error Goto 0
   If not wbChng is Nothing Then
      'Your code to change the cells
   End If
 
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,007
Members
452,374
Latest member
keccles

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