Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro running against hidden worksheet | Excel Discussion (Misc queries) | |||
how to prevent code running when in a worksheet code | Excel Programming | |||
Code to access a hidden worksheet | Excel Programming | |||
Running code on hidden sheets (revisited) | Excel Programming | |||
Running code on hidden sheets | Excel Programming |