Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Control Row Height

I want to control the row height by not allowing a user to chage it but I
dont want to protect the worksheet. Can this be done. All I have thought of
so far is on Auto_Open is to set the row height as I want it but that does
not give the user notice as they try to change the row height. When they
change it I would like to give a message that the row height cannot be change
and then set it back. Even if they have select more than one row or if they
do auto wrap...etc.

Thank you,

Steven
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 389
Default Control Row Height

And the % view also. Is that controllable. Thank you.

"Steven" wrote:

I want to control the row height by not allowing a user to chage it but I
dont want to protect the worksheet. Can this be done. All I have thought of
so far is on Auto_Open is to set the row height as I want it but that does
not give the user notice as they try to change the row height. When they
change it I would like to give a message that the row height cannot be change
and then set it back. Even if they have select more than one row or if they
do auto wrap...etc.

Thank you,

Steven

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Control Row Height

Steven, I don't believe the format facility has an event that can be trapped
to control the row height. Maybe someone smarter than me could create one,
but there are no built in methods other than locking the sheet that I know of.

"Steven" wrote:

And the % view also. Is that controllable. Thank you.

"Steven" wrote:

I want to control the row height by not allowing a user to chage it but I
dont want to protect the worksheet. Can this be done. All I have thought of
so far is on Auto_Open is to set the row height as I want it but that does
not give the user notice as they try to change the row height. When they
change it I would like to give a message that the row height cannot be change
and then set it back. Even if they have select more than one row or if they
do auto wrap...etc.

Thank you,

Steven

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Control Row Height

I don't believe the format facility has an event that can be trapped

You're right so the only option is some other event like SelectionChange:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("10:10").RowHeight < 15 Then
Range("10:10").RowHeight = 15
MsgBox "Please don't change row 10's height"
End If
End Sub

This goes in the sheet module.

--
Jim
"JLGWhiz" wrote in message
...
| Steven, I don't believe the format facility has an event that can be
trapped
| to control the row height. Maybe someone smarter than me could create
one,
| but there are no built in methods other than locking the sheet that I know
of.
|
| "Steven" wrote:
|
| And the % view also. Is that controllable. Thank you.
|
| "Steven" wrote:
|
| I want to control the row height by not allowing a user to chage it
but I
| dont want to protect the worksheet. Can this be done. All I have
thought of
| so far is on Auto_Open is to set the row height as I want it but that
does
| not give the user notice as they try to change the row height. When
they
| change it I would like to give a message that the row height cannot be
change
| and then set it back. Even if they have select more than one row or
if they
| do auto wrap...etc.
|
| Thank you,
|
| Steven

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Control Row Height

Hi Jim, I suppose that would work if he also secured the code module. The
OP objective was to lock the row height so that it could not be tampered
with, but I suppose just making it revert back to the desired setting would
work about 99.8% of the time until somebody who really wanted to change it
came along..

"Jim Rech" wrote:

I don't believe the format facility has an event that can be trapped


You're right so the only option is some other event like SelectionChange:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("10:10").RowHeight < 15 Then
Range("10:10").RowHeight = 15
MsgBox "Please don't change row 10's height"
End If
End Sub

This goes in the sheet module.

--
Jim
"JLGWhiz" wrote in message
...
| Steven, I don't believe the format facility has an event that can be
trapped
| to control the row height. Maybe someone smarter than me could create
one,
| but there are no built in methods other than locking the sheet that I know
of.
|
| "Steven" wrote:
|
| And the % view also. Is that controllable. Thank you.
|
| "Steven" wrote:
|
| I want to control the row height by not allowing a user to chage it
but I
| dont want to protect the worksheet. Can this be done. All I have
thought of
| so far is on Auto_Open is to set the row height as I want it but that
does
| not give the user notice as they try to change the row height. When
they
| change it I would like to give a message that the row height cannot be
change
| and then set it back. Even if they have select more than one row or
if they
| do auto wrap...etc.
|
| Thank you,
|
| Steven




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Control Row Height

I suppose that would work if he also secured the code module.

Well, I design Excel apps with the intent of preventing users from
accidentally destroying them, but if they truly want to muck things up then
they certainly can. In Excel nothing is really 'secure' as you know so
that's all we can do.
--
Jim
"JLGWhiz" wrote in message
...
| Hi Jim, I suppose that would work if he also secured the code module.
The
| OP objective was to lock the row height so that it could not be tampered
| with, but I suppose just making it revert back to the desired setting
would
| work about 99.8% of the time until somebody who really wanted to change it
| came along..
|
| "Jim Rech" wrote:
|
| I don't believe the format facility has an event that can be trapped
|
| You're right so the only option is some other event like
SelectionChange:
|
| Private Sub Worksheet_SelectionChange(ByVal Target As Range)
| If Range("10:10").RowHeight < 15 Then
| Range("10:10").RowHeight = 15
| MsgBox "Please don't change row 10's height"
| End If
| End Sub
|
| This goes in the sheet module.
|
| --
| Jim
| "JLGWhiz" wrote in message
| ...
| | Steven, I don't believe the format facility has an event that can be
| trapped
| | to control the row height. Maybe someone smarter than me could create
| one,
| | but there are no built in methods other than locking the sheet that I
know
| of.
| |
| | "Steven" wrote:
| |
| | And the % view also. Is that controllable. Thank you.
| |
| | "Steven" wrote:
| |
| | I want to control the row height by not allowing a user to chage
it
| but I
| | dont want to protect the worksheet. Can this be done. All I have
| thought of
| | so far is on Auto_Open is to set the row height as I want it but
that
| does
| | not give the user notice as they try to change the row height.
When
| they
| | change it I would like to give a message that the row height
cannot be
| change
| | and then set it back. Even if they have select more than one row
or
| if they
| | do auto wrap...etc.
| |
| | Thank you,
| |
| | Steven
|
|

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
How to control row height and text wrap in non-merged cell ??? akm Excel Discussion (Misc queries) 2 November 16th 07 02:01 AM
need to know how to control length and height of lines LPN New Users to Excel 2 August 3rd 06 12:04 AM
how to increase the height of a check box from the control toolbox steve-o Excel Discussion (Misc queries) 1 June 9th 05 03:53 AM
Is there a way that I can control a row's height with programming? (or cell contents) lseyer Excel Programming 3 June 8th 04 10:51 PM
Changing the height of a commandbar control (edit box) at runtime simon livings Excel Programming 1 December 13th 03 01:28 AM


All times are GMT +1. The time now is 02:10 PM.

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"