vba to update linked pictures when a cell value is TRUE

cjcass

Well-known Member
Joined
Oct 27, 2011
Messages
683
Office Version
  1. 2016
Platform
  1. Windows
Hi,
I have a wksht with 20 pictures in it. Each picture is linked to a range of cells in other wkshts via named ranges. The pictures all update when the cell value in S4 contains 'TRUE' and when the cell value is 'FALSE' the pictures don't update. When I manually type 'TRUE' into S4 or select 'TRUE' from a dropdown list the pictures update, however when I run the following macro the pictures won't update. I'm guessing there is something wrong with the code? Any help much appreciated.


Code:
Sheet88.Select
    
    Range("S4").Select
    ActiveCell.FormulaR1C1 = "TRUE"
    Range("S5").Select
    
    Range("S4").Select
    ActiveCell.FormulaR1C1 = "FALSE"
    Range("S5").Select
 

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.
ok, have found a massively simple solution, put the following code between the two actions...

DoEvents
 
Upvote 0

Forum statistics

Threads
1,217,345
Messages
6,136,026
Members
449,978
Latest member
mtbe

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