Changing the value in multiple sheets without selecting those sheets

  • Thread starter Thread starter herm
  • Start date Start date
H

herm

I have a workbook with 10 sheets and currently use the formula

sheets("sheet2").select
Range ("a1").select
Activecell.formularR1c1= "true"

and repeat this for sheet3,4,5 and so on
Note not all the values are identical some are true and some false

Because the VBA sub has to then jump to every sheet and then enter the
value it creates a flashing effect that irritates the hell out of me

Is there a code where it will make those changes in other sheets
without activating those sheets first

PLEASE Help
Thanks
Herman
 
You can prevent display updating by adding row

Application.Screenupdating=False

in the beginning of your code.

Ecco
 
Hi,

1. You stop the flashing by using

Application.Screenupdating=False

at the beginning of the code.
Do not forget to add

Application.Screenupdating=True

at the end.

2. There is no need to select things:

sheets("sheet2").select
Range ("a1").select
Activecell.formularR1c1= "true"

Can be improved to:

sheets("sheet2").Range("a1").formulaR1c1= "true"


Regards,

Jan Karel Pieterse
Excel TA/MVP
 
Thanks Jan Karel

Or shall I say dankie boet

You realy gave me a good tip there it works like a charm
 
Back
Top