Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Boundaries Excel Worksheet


Dear all, in one of my applications I would like to physically limit the
number of rows and columns. So, the user cannot navigate beyond - say -
20 rows and 10 columns. Any way to do this in VBA? Thanks!


--
Kees Korver
------------------------------------------------------------------------
Kees Korver's Profile: http://www.excelforum.com/member.php...o&userid=21562
View this thread: http://www.excelforum.com/showthread...hreadid=532165

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Boundaries Excel Worksheet

Kees, Try this.

Worksheets("Sheet1").ScrollArea = "A1:J20"

this will lock the worksheet at 20 rows, and 10 Columns.

enjoy, Rick


"Kees Korver"
wrote in message
...

Dear all, in one of my applications I would like to physically limit the
number of rows and columns. So, the user cannot navigate beyond - say -
20 rows and 10 columns. Any way to do this in VBA? Thanks!


--
Kees Korver
------------------------------------------------------------------------
Kees Korver's Profile:

http://www.excelforum.com/member.php...o&userid=21562
View this thread: http://www.excelforum.com/showthread...hreadid=532165



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Boundaries Excel Worksheet

Kees,
As Rick pointed out, it's .ScrollArea.
But this is not a persistent setting (in Office 2K anyway), so you have to
set it each time the WB is opened.

NickHK

"Kees Korver"
wrote in message
...

Dear all, in one of my applications I would like to physically limit the
number of rows and columns. So, the user cannot navigate beyond - say -
20 rows and 10 columns. Any way to do this in VBA? Thanks!


--
Kees Korver
------------------------------------------------------------------------
Kees Korver's Profile:

http://www.excelforum.com/member.php...o&userid=21562
View this thread: http://www.excelforum.com/showthread...hreadid=532165



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Boundaries Excel Worksheet


Nick (or others), how can I accomplish this automatically? If I open a
Workbook, can I force Excel to run a macro immediately? e.g. with
Workbook_Open command somewhere?
Just make a macro in VBA-editor with the name Workbook_Open()?
(I tried this, but Excel doesn't seem to detect this)
Thanks!
Kees

NickHK Wrote:
Kees,
As Rick pointed out, it's .ScrollArea.
But this is not a persistent setting (in Office 2K anyway), so you have
to
set it each time the WB is opened.

NickHK



--
Kees Korver
------------------------------------------------------------------------
Kees Korver's Profile: http://www.excelforum.com/member.php...o&userid=21562
View this thread: http://www.excelforum.com/showthread...hreadid=532165

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Boundaries Excel Worksheet

Kees, here is the procedure to insert your code Workbook_Open().

First goto the VB Editor, now from VBA Project Explore window right
click on "ThisWorkbook", now click on "view code". Now on the left side
above the edit window click on the drop list and select "Workbook", now
from the right side drop down click and select the event. In your case
select "Open". Now VBE will place skeleton structure of Workbook_Open()
sub into the edit window. Now add the code to this sub ie...

Private Sub Workbook_Open()

Worksheets("Sheet1").ScrollArea = "A1:J20"

End Sub

enjoy, Rick



"Kees Korver"
wrote in message
...

Nick (or others), how can I accomplish this automatically? If I open a
Workbook, can I force Excel to run a macro immediately? e.g. with
Workbook_Open command somewhere?
Just make a macro in VBA-editor with the name Workbook_Open()?
(I tried this, but Excel doesn't seem to detect this)
Thanks!
Kees

NickHK Wrote:
Kees,
As Rick pointed out, it's .ScrollArea.
But this is not a persistent setting (in Office 2K anyway), so you have
to
set it each time the WB is opened.

NickHK



--
Kees Korver
------------------------------------------------------------------------
Kees Korver's Profile:

http://www.excelforum.com/member.php...o&userid=21562
View this thread: http://www.excelforum.com/showthread...hreadid=532165





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Boundaries Excel Worksheet


Rick, all works fine! Thank you for your attention and time! Kees

Rick Hansen Wrote:
Kees, here is the procedure to insert your code Workbook_Open().

First goto the VB Editor, now from VBA Project Explore window right
click on "ThisWorkbook", now click on "view code". Now on the left
side
above the edit window click on the drop list and select "Workbook",
now
from the right side drop down click and select the event. In your
case
select "Open". Now VBE will place skeleton structure of
Workbook_Open()
sub into the edit window. Now add the code to this sub ie...

Private Sub Workbook_Open()

Worksheets("Sheet1").ScrollArea = "A1:J20"

End Sub

enjoy, Rick



--
Kees Korver
------------------------------------------------------------------------
Kees Korver's Profile: http://www.excelforum.com/member.php...o&userid=21562
View this thread: http://www.excelforum.com/showthread...hreadid=532165

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
Bottom boundaries of row headings Angela Excel Discussion (Misc queries) 4 June 27th 07 10:42 AM
Copy & Cut different animated boundaries Sam Prince Excel Worksheet Functions 0 August 14th 06 11:44 AM
Can individual cell boundaries be changed? JoChain Excel Worksheet Functions 2 January 30th 06 07:47 PM
Constructing range address given row and col numbers of boundaries [email protected] Excel Worksheet Functions 4 November 16th 05 04:23 PM
tough problem - working out if data is within certain boundaries phillip harrison Excel Programming 4 July 17th 03 05:53 PM


All times are GMT +1. The time now is 03:01 PM.

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

About Us

"It's about Microsoft Excel"