Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 109
Default How to work with macro in background

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i get my macro to only work on data thats there? welshmag Excel Discussion (Misc queries) 1 May 12th 06 09:59 AM
U.S. Command Button Macro won't work in Australian version 2003 Ron in Dallas Excel Discussion (Misc queries) 1 December 23rd 05 05:08 PM
How can I run a macro in the background whilst a UserForm is visib cdb Excel Discussion (Misc queries) 3 February 10th 05 06:58 PM
Can a macro be made to work based on a formula? lonnied Excel Discussion (Misc queries) 2 January 26th 05 04:00 AM
How do I record a macro which should work on multiple files ? Venkataraman.P.E Excel Discussion (Misc queries) 2 January 16th 05 10:26 AM


All times are GMT +1. The time now is 01:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"