Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Limit worksheet for 50 rows only

Hi,

I want to make a procedure that allow to sheet1 for 50 rows of data
only.

or

How I can limit the worksheet only for 50 rows data entry, If I will
hide all the rows from 51 to bottom.

is it possible, that when user reach row number 50 then he get the
message "your data entry limit is finished, make new worksheet".

Regards.

Shahzad
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Limit worksheet for 50 rows only

pretty crude but if a cell in the 50th row or beyond is selected you could
use a promt like:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Row = 50 Then MsgBox "The Sheet is Full" & vbcrlf & " Please
start a New Sheet"
End Sub


"Shazi" wrote in message
...
Hi,

I want to make a procedure that allow to sheet1 for 50 rows of data
only.

or

How I can limit the worksheet only for 50 rows data entry, If I will
hide all the rows from 51 to bottom.

is it possible, that when user reach row number 50 then he get the
message "your data entry limit is finished, make new worksheet".

Regards.

Shahzad



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Limit worksheet for 50 rows only

On Jul 29, 3:30*pm, "Corey" wrote:
pretty crude but if a cell in the 50th row or beyond is selected you could
use a promt like:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If ActiveCell.Row = 50 Then MsgBox "The Sheet is Full" & vbcrlf & " Please
start a New Sheet"
End Sub

"Shazi" wrote in message

...



Hi,


I want to make a procedure that allow to sheet1 for 50 rows of data
only.


or


How I can limit the worksheet only for 50 rows data entry, If I will
hide all the rows from 51 to bottom.


is it possible, that when user reach row number 50 then he get the
message "your data entry limit is finished, make new worksheet".


Regards.


Shahzad- Hide quoted text -


- Show quoted text -


Hi,

I used your code, but its not enough, after getting the message, user
can still enter the data, I want to see only Row1 to Row 50 only.

regards.

shahzad










  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Limit worksheet for 50 rows only

Right click the sheet tab, View Code
In the Properties panel for the worksheet (if necessary F4)
enter your your address as appropriate in the ScrollArea property, eg
1:50
or
A1:M50

"Shazi" wrote in message
...
Hi,

I want to make a procedure that allow to sheet1 for 50 rows of data
only.

or

How I can limit the worksheet only for 50 rows data entry, If I will
hide all the rows from 51 to bottom.

is it possible, that when user reach row number 50 then he get the
message "your data entry limit is finished, make new worksheet".

Regards.

Shahzad



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Limit worksheet for 50 rows only

sub Shazi()

dim ws as worksheet
dim wb as workbook

set wb = activeworkbook

for each ws in wb.worksheets
Rows("51:65536").EntireRow.Hidden = True
next ws

end sub

========================
run once for the whole workbook.
hth
susan


On Jul 29, 8:10*am, Shazi wrote:
Hi,

I want to make a procedure that allow to sheet1 for 50 rows of data
only.

or

How I can limit the worksheet only for 50 rows data entry, If I will
hide all the rows from 51 to bottom.

is it possible, that when user reach row number 50 then he get the
message "your data entry limit is finished, make new worksheet".

Regards.

Shahzad




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Limit worksheet for 50 rows only

hi,

Select the entire sheet by click the box at the intersect of row/column
headings then

data|Validation
Select 'Custom'
Enter the formula

=Row()<=50

Mike

"Shazi" wrote:

Hi,

I want to make a procedure that allow to sheet1 for 50 rows of data
only.

or

How I can limit the worksheet only for 50 rows data entry, If I will
hide all the rows from 51 to bottom.

is it possible, that when user reach row number 50 then he get the
message "your data entry limit is finished, make new worksheet".

Regards.

Shahzad

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Limit worksheet for 50 rows only

On Jul 29, 4:30*pm, Susan wrote:
sub Shazi()

dim ws as worksheet
dim wb as workbook

set wb = activeworkbook

for each ws in wb.worksheets
* * *Rows("51:65536").EntireRow.Hidden = True
next ws

end sub

========================
run once for the whole workbook.
hth
susan

On Jul 29, 8:10*am, Shazi wrote:



Hi,


I want to make a procedure that allow to sheet1 for 50 rows of data
only.


or


How I can limit the worksheet only for 50 rows data entry, If I will
hide all the rows from 51 to bottom.


is it possible, that when user reach row number 50 then he get the
message "your data entry limit is finished, make new worksheet".


Regards.


Shahzad- Hide quoted text -


- Show quoted text -




Dear Susan,

Dear Mike,

Dear Peter,


Thank you very much for your suggessions, really very good idea you
sent to me, I will go through Susan's code. Thanks a lot of your
help.

with best regards.


Shahzad
Madinah
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
limit number of rows in worksheet from 6000+ to 600 Samsky2174 Excel Worksheet Functions 2 March 9th 09 12:37 PM
How to limit number of rows and column in worksheet? Hrishi Excel Discussion (Misc queries) 1 June 6th 07 01:36 PM
want to limit worksheet to 1000 rows instead of 65,000 GeoObject New Users to Excel 6 April 14th 07 02:15 AM
is there a limit to the number of rows a worksheet can have? Debi Excel Discussion (Misc queries) 2 May 22nd 06 02:47 PM
Increase rows in worksheet beyond 65,536 row limit Ann Calantzis Excel Discussion (Misc queries) 2 February 25th 05 01:33 PM


All times are GMT +1. The time now is 04:56 AM.

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

About Us

"It's about Microsoft Excel"