Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Running Code on Hidden Worksheet

We have a basic workbook that managers use to record comments (good or bad)
about other managers. When an entry is made, the manager's name is entered
in column A, the date in column B and the comment in column C. The workbook
is available to all managers. However, when a manager opens it, we don't
want him/her to see any entries made about themselves; rather, they can see
only entries about other managers.

I've successfully created code that captures the user's Windows login name
as a means to hide any row containing their name. The code starts by
selecting the first cell in column A (which I call "Start"), looking down
that column for any instances of the user's name, and hiding the row.
Protection is then applied to prevent users from unhiding the rows.

My challenge is how to have this code run while that worksheet is hidden,
then only display it after the user's rows have been hidden (I want to hide
the worksheet upon opening because I don't want the user to have a temporary
glimpse of it before the code actually runs). Because my code starts with
Range("Start").Select, I get an error message because the worksheet is hidden
to begin with.

Thanks in advance for any help/suggestions for overcoming this issue!
--
Steve C
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Running Code on Hidden Worksheet

On Feb 13, 10:16 am, Steve C wrote:
We have a basic workbook that managers use to record comments (good or bad)
about other managers. When an entry is made, the manager's name is entered
in column A, the date in column B and the comment in column C. The workbook
is available to all managers. However, when a manager opens it, we don't
want him/her to see any entries made about themselves; rather, they can see
only entries about other managers.

I've successfully created code that captures the user's Windows login name
as a means to hide any row containing their name. The code starts by
selecting the first cell in column A (which I call "Start"), looking down
that column for any instances of the user's name, and hiding the row.
Protection is then applied to prevent users from unhiding the rows.

My challenge is how to have this code run while that worksheet is hidden,
then only display it after the user's rows have been hidden (I want to hide
the worksheet upon opening because I don't want the user to have a temporary
glimpse of it before the code actually runs). Because my code starts with
Range("Start").Select, I get an error message because the worksheet is hidden
to begin with.

Thanks in advance for any help/suggestions for overcoming this issue!
--
Steve C


Not sure. One thing I do know is that when saving a document it will
always open to the last sheet viewed. You could, simply enough, just
code it to switch to the main page and then save and close after a
manager submits a comment, whereafter opening the document returns you
to the main page.

Otherwise perhaps consider a 'view content' button and using white
text ("invisible") before the hiding and unhiding begins.

Im sure someone will come in with some real code though:)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Running Code on Hidden Worksheet

Yes it can be done but you can not use the selects. That being said if this
info is confidential then I would recommend that Excel not be used. Any
protection or other form of security that you apply can be very easily
defeated. If you still intend to use XL and want help you will need to post
your code.
--
HTH...

Jim Thomlinson


"Steve C" wrote:

We have a basic workbook that managers use to record comments (good or bad)
about other managers. When an entry is made, the manager's name is entered
in column A, the date in column B and the comment in column C. The workbook
is available to all managers. However, when a manager opens it, we don't
want him/her to see any entries made about themselves; rather, they can see
only entries about other managers.

I've successfully created code that captures the user's Windows login name
as a means to hide any row containing their name. The code starts by
selecting the first cell in column A (which I call "Start"), looking down
that column for any instances of the user's name, and hiding the row.
Protection is then applied to prevent users from unhiding the rows.

My challenge is how to have this code run while that worksheet is hidden,
then only display it after the user's rows have been hidden (I want to hide
the worksheet upon opening because I don't want the user to have a temporary
glimpse of it before the code actually runs). Because my code starts with
Range("Start").Select, I get an error message because the worksheet is hidden
to begin with.

Thanks in advance for any help/suggestions for overcoming this issue!
--
Steve C

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
Macro running against hidden worksheet George Excel Discussion (Misc queries) 1 July 23rd 07 09:42 PM
how to prevent code running when in a worksheet code Corey Excel Programming 5 August 13th 06 08:52 AM
Code to access a hidden worksheet sir Lancelot Excel Programming 3 November 19th 05 03:15 PM
Running code on hidden sheets (revisited) Pinda[_2_] Excel Programming 4 January 31st 05 08:04 PM
Running code on hidden sheets Pinda[_2_] Excel Programming 3 January 31st 05 03:07 PM


All times are GMT +1. The time now is 04:28 AM.

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

About Us

"It's about Microsoft Excel"