Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a hidden worksheet.
I try to use the data on it with a macro but it will not allow me. So i unhid the sheet in the macro and when it finished the task i hid it back. The problem is that I am able to see the sheet while i run the macro. There are two solutions: 1. How can i operate a macro on a hidden sheet? 2. How can i run a macro in the background? Please help. Jared |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Jared wrote:
I have a hidden worksheet. I try to use the data on it with a macro but it will not allow me. So i unhid the sheet in the macro and when it finished the task i hid it back. The problem is that I am able to see the sheet while i run the macro. There are two solutions: 1. How can i operate a macro on a hidden sheet? 2. How can i run a macro in the background? Please help. Jared Hi Jared, Two solutions: 1) the simplest: insert this line of code before unhiding the sheet: Application.ScreenUdating = False ' here your code on your sheet ' then hide again the sheet then insert this line of code Application.ScreenUpdating = True 2) a little bit more difficult: you can work on an hidden sheet without selecting anything, e.g.: instead of this code: Worksheet("Hidden").Select Range("A1").Select Range("A1").Value = 2*Range("A1").Value you can use: With Worksheet("Hidden") .Range("A1").Value = 2*.Range("A1").Value End With -- Hope I helped you. Thanks in advance for your feedback. Ciao Franz Verga from Italy |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you!
I think i will stick with the simple version but it is always good knowing the alternative You are the man Jared "Franz Verga" wrote: Jared wrote: I have a hidden worksheet. I try to use the data on it with a macro but it will not allow me. So i unhid the sheet in the macro and when it finished the task i hid it back. The problem is that I am able to see the sheet while i run the macro. There are two solutions: 1. How can i operate a macro on a hidden sheet? 2. How can i run a macro in the background? Please help. Jared Hi Jared, Two solutions: 1) the simplest: insert this line of code before unhiding the sheet: Application.ScreenUdating = False ' here your code on your sheet ' then hide again the sheet then insert this line of code Application.ScreenUpdating = True 2) a little bit more difficult: you can work on an hidden sheet without selecting anything, e.g.: instead of this code: Worksheet("Hidden").Select Range("A1").Select Range("A1").Value = 2*Range("A1").Value you can use: With Worksheet("Hidden") .Range("A1").Value = 2*.Range("A1").Value End With -- Hope I helped you. Thanks in advance for your feedback. Ciao Franz Verga from Italy |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do i get my macro to only work on data thats there? | Excel Discussion (Misc queries) | |||
U.S. Command Button Macro won't work in Australian version 2003 | Excel Discussion (Misc queries) | |||
How can I run a macro in the background whilst a UserForm is visib | Excel Discussion (Misc queries) | |||
Can a macro be made to work based on a formula? | Excel Discussion (Misc queries) | |||
How do I record a macro which should work on multiple files ? | Excel Discussion (Misc queries) |