Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

ScrollArea limitation also prohibits highlighting entire row(s)?

  Asked By: Meenachi    Date: Dec 11    Category: MS Office    Views: 602
  

When I code the following in Workbook_open() of ThisWorkbook to limit the
col/rows that a user can access:

sheet1.ScrollArea = "a1:z100"

It works as expected.

But then, I found that I was not allowed to click/drag on the row header to
highlight the entire row(or rows). If I comment the above code out, I could
click/drag row headers again.

Does this sound right? Why does ScrollArea have anything to do with
clicking/draging row headers?

How can I both limiting the col/rows that a user can access and allowing a
user to click/drag on the row headers to highlight the entire row(s)?

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Aaron Kennedy     Answered On: Dec 11

: When I code  the following in Workbook_open() of ThisWorkbook to limit
: the col/rows that a user  can access:
:
: sheet1.ScrollArea = "a1:z100"
:
: It works  as expected.
:
: But then, I found  that I was not allowed  to click/drag on the row
header  to highlight  the entire  row(or rows). If I comment  the above
: code out, I could click/drag row  headers again.
:
: Does this sound  right? Why does ScrollArea have anything to do
: with clicking/draging row headers?

According to VBA Help, "Cells outside the scroll area cannot be
selected." Selecting an entire row would attempt to do that.


: How can I both limiting the col/rows that a user can access  and
: allowing a user to click/drag on the row headers to highlight the
: entire row(s)?

I don't know that you can.

 
Answer #2    Answered By: Ana Silva     Answered On: Dec 11

If you have nothing to the right of col Z that you want protected, you could
make it
sheet1.ScrollArea = "A1:IV100"