Changing the value in multiple sheets without selecting those sheets

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
 
E

Ecco

You can prevent display updating by adding row

Application.Screenupdating=False

in the beginning of your code.

Ecco
 
J

Jan Karel Pieterse

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
 
H

Herman Schoonbee

Thanks Jan Karel

Or shall I say dankie boet

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


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top