Macro Help

J

John

I have an information sheet that i am using for my
company. Withing the workbook, there are several sheets,
one of them containing formulas and references. Within
the information sheet there is a clear sheet button.
Once that is depressed it clears all the information on
the information sheet as well as some of the information
from the formula sheet. However I don't want the formula
sheet to be seen. How do you write the macro, so that
the formula worksheet appears to clear the info and then
hides again? Hope this makes sense.
 
J

JulieD

Hi John

at the start of your code type
**************
application.screenupdating = false 'this will stop the screen flashing
when things happen
sheets("mysheet").visible = true 'display your formula & reference
worksheet - replace mysheet with actual name
sheets("mysheet").activate 'activate it to do stuff to it
'do your code here
sheets("mysheet").visible = false 'hide your formula & reference
worksheet
sheets("myfirstsheet").activate 'activate whatever form you want the
users to see when the macro finishes - replace myfirstsheet with the actual
name
application.screenupdating = true
**********
hope this helps
let us know how you go

Cheers
JulieD
 
J

John

Thanks Julie. Worked perfectly


-----Original Message-----
Hi John

at the start of your code type
**************
application.screenupdating = false 'this will stop the screen flashing
when things happen
sheets("mysheet").visible = true 'display your formula & reference
worksheet - replace mysheet with actual name
sheets("mysheet").activate 'activate it to do stuff to it
'do your code here
sheets("mysheet").visible = false 'hide your formula & reference
worksheet
sheets("myfirstsheet").activate 'activate whatever form you want the
users to see when the macro finishes - replace myfirstsheet with the actual
name
application.screenupdating = true
**********
hope this helps
let us know how you go

Cheers
JulieD




.
 

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