Macro Help

  • Thread starter Thread starter John
  • Start date Start date
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.
 
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
 
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




.
 
Back
Top