Macros Wont Run After Hiding Sheet

J

John Calder

Hi

I run Excel 2K

I have a table on a wroksheet called SUPPORT SHEET.

I use the sheet for various purposes. eg, validation tables, lookup tables etc

On a different sheet I have a macro that copies data from the SUPPORT SHEET.
The macro works fine until I hide the SUPPORT SHEET, then the macro does not
work.

Is there a way I can hide the SUPPORT SHEET but the macro I use still work?


Thanks

John
 
A

AltaEgo

Two options:

Sub test()

Application.ScreenUpdating = False
Worksheets("SUPPORT SHEET").Visible = True

'yourcode

Worksheets("SUPPORT SHEET").Visible = False
Application.ScreenUpdating = True
End Sub

OR, my preferred method is to change code so it refers to or updates the
sheet without activating or selecting the sheet or its content.

If you need more specific advice on the latter post further question/s.
 
J

John Calder

Steve

What you have given me will do. It works great...so well done !

and many thanks

John
 

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