Issue with creating a specific macro where two conditions exist

G

Guest

I am trying to create a macro where apon clicking a commandbutton in a user
form assigned to a specific defintion it will go directly to a specific cell
within a specific range. For example if the user named Brian Monaghan clicks
on the button for the definiton of analytics I want him to be taken to the
Analytics cell for the range assigned the name of "Brian_Monaghan" and not be
able to click on any other range in the worksheet titled
Employee_Tasks_Tracker_MOCK3. After I do that do I need to create a nested
loop to have this done for every single employee or do I just have to
manually enter all of them in there. I apologize if this question is
confusing I am a novice at Macros and am having to learn on the fly.
 
H

herb19355

Hi Brian,

I would suggest taking a look at the Select Case Statement. It executes
one of several groups of statements, depending on the value of an
expression.

I would also suggest naming the ranges you would like to have each user
access with their name and them protect all other ranges or hide the
contents (by changing the color of the cell text) so that only the
person whose name is assigned to that range will be able to access it.
Hope that helps!
 
G

Guest

Herb thanks for the tip on the select case statement that worked out
perfectly now the only trouble I am having is protecting the other named
ranges. I tried to create a macro where it unlocked the range for only one
specific range name as defined by the button that is pushed but for some
reason the code error says I can't set the locked property=false. Is there
another way to do this or is their an adjustment I can make to the code I
have.
 

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