PC Review


Reply
Thread Tools Rate Thread

Control Row Height

 
 
Steven
Guest
Posts: n/a
 
      10th Sep 2008
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 With Quote
 
 
 
 
Steven
Guest
Posts: n/a
 
      10th Sep 2008
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 With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      10th Sep 2008
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 With Quote
 
Jim Rech
Guest
Posts: n/a
 
      10th Sep 2008
>>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" <(E-Mail Removed)> wrote in message
news:802F53C7-9A09-4AE9-A9F9-(E-Mail Removed)...
| 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 With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      10th Sep 2008
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" <(E-Mail Removed)> wrote in message
> news:802F53C7-9A09-4AE9-A9F9-(E-Mail Removed)...
> | 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 With Quote
 
Jim Rech
Guest
Posts: n/a
 
      11th Sep 2008
>>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" <(E-Mail Removed)> wrote in message
news:3AC614FF-2EC1-479C-9953-(E-Mail Removed)...
| 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" <(E-Mail Removed)> wrote in message
| > news:802F53C7-9A09-4AE9-A9F9-(E-Mail Removed)...
| > | 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Increasing control's height does not overlay control underneath mscertified Microsoft Access Form Coding 1 14th Jan 2008 12:39 PM
Why can't I get the right control height? =?Utf-8?B?aXdkdTE1?= Microsoft VB .NET 4 13th Apr 2006 04:39 AM
Changing height of text box control as row height changes Brett Microsoft Access Form Coding 1 18th Jan 2006 07:57 AM
Get height of control where parent's height is 0 =?Utf-8?B?cmVkbmVvbg==?= Microsoft C# .NET 2 1st Mar 2005 11:37 AM
Control Height Eric Microsoft ASP .NET 5 7th Feb 2004 06:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:51 AM.