Lock out a portion of spreadsheet based on a condition
when a response is made that would require by-passing the specified range,
have your code unprotect the sheet, lock the cells (C15:C30, K15:K19), then
protect the sheet.
--
Regards,
Tom Ogilvy
"Ryan" wrote in message
...
I am new to VBA programming in Excel and I have a couple questions about
tabbing through a spreadsheet. My spreadsheet has a top portion where users
will input their data and then based on calculations of that data they will
get an output on the bottom of the page. I have created a Macro that is
assigned to a Button that Resets the information that the users put in.
Included in this Macro is a way to protect the worksheet so that the users
can only change the cells where their input is necessary. This protection
also enables me to set a tab order for how the users navigate the input
portion of the worksheet.
Now I am having a couple of issues with the tab order. First, in one of
the input boxes the users choose between two options (A and B). If they
choose option "A" then there is an input section on the spreadsheet that
they do not need to fill in (Cells C15:C20,K15:K19). What I would like to
accomplish is to have the tab order skip this input section if "A" is
selected, but to not skip this input section if "B" is selected.
The other issue that I am having has to do with drop down (or combo
boxes). I have several of these as input areas for the users. Currently,
when the user tabs through the input section of the worksheet they tab to
the cell behind the combo box. For instance the tab order places the cursor
in cell C9. This is the cell that the combo box is associated with, but the
cursor is not in the combo box. So to get the selection that the user wants
they either need to go to the mouse, or know exactly what the choice is they
want to choose without seeing the options. What I would like to do is be
able to tab into the combo box and have it immediately drop down so that the
users can see what the selection choices are, then have it so that they can
just type the first couple of letters and the choice will be pulled into the
combo box, and finally be able to hit the tab key to move onto the next box
in my tab order.
Any help with this problem will be greatly appreciated.
Thanks in advance,
Ryan
|