Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default Userform Textbox - fundamental flaw

Oops, just discovered a flaw (probably one of many to come).
The form is designed to represent an A4 page in portrait mode, where
basically the bottom two thirds are occupied by one large textbox.

If I go into this textbox and keep pressing Enter, I can get to the very
bottom of the textbox and I can enter text.

But if I then press Enter the textbox scrolls up the form,
giving the user the impression that the textbox is expanding to meet the
user's needs.

Can I stop this, please?

Regards.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Userform Textbox - fundamental flaw

How about using the maxlength property.

--
Regards,
Tom Ogilvy


"Stuart" wrote in message
...
Oops, just discovered a flaw (probably one of many to come).
The form is designed to represent an A4 page in portrait mode, where
basically the bottom two thirds are occupied by one large textbox.

If I go into this textbox and keep pressing Enter, I can get to the very
bottom of the textbox and I can enter text.

But if I then press Enter the textbox scrolls up the form,
giving the user the impression that the textbox is expanding to meet the
user's needs.

Can I stop this, please?

Regards.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default Userform Textbox - fundamental flaw

Rollocks!...should have looked at the available properties
for a textbox before posting.
Apologies.

Regards.

"Tom Ogilvy" wrote in message
...
How about using the maxlength property.

--
Regards,
Tom Ogilvy


"Stuart" wrote in message
...
Oops, just discovered a flaw (probably one of many to come).
The form is designed to represent an A4 page in portrait mode, where
basically the bottom two thirds are occupied by one large textbox.

If I go into this textbox and keep pressing Enter, I can get to the very
bottom of the textbox and I can enter text.

But if I then press Enter the textbox scrolls up the form,
giving the user the impression that the textbox is expanding to meet the
user's needs.

Can I stop this, please?

Regards.






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default Userform Textbox - fundamental flaw

Perhaps not as simple, as simple me, first thought.

The textbox's height property is set to 419.25 (which I believe is a value
in points) and the width to 102.
The Font is set to Times New Roman, FontSize to 12 and Bold.

Help for MaxLength gives one option:
MaxLength Property (Forms)
which says I can set the maximum number of characters in the
textbox.................

I have absolutely no idea how I can calculate that.

Help please.

Regards.




Tom Ogilvy" wrote in message
...
How about using the maxlength property.

--
Regards,
Tom Ogilvy


"Stuart" wrote in message
...
Oops, just discovered a flaw (probably one of many to come).
The form is designed to represent an A4 page in portrait mode, where
basically the bottom two thirds are occupied by one large textbox.

If I go into this textbox and keep pressing Enter, I can get to the very
bottom of the textbox and I can enter text.

But if I then press Enter the textbox scrolls up the form,
giving the user the impression that the textbox is expanding to meet the
user's needs.

Can I stop this, please?

Regards.






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Userform Textbox - fundamental flaw

Stuart,
Using a fixed width font will make this easier.
If you must use a proportional width font, fill the text box with "W" and
use that number of caharacters.

NickHK

"Stuart" wrote in message
...
Perhaps not as simple, as simple me, first thought.

The textbox's height property is set to 419.25 (which I believe is a value
in points) and the width to 102.
The Font is set to Times New Roman, FontSize to 12 and Bold.

Help for MaxLength gives one option:
MaxLength Property (Forms)
which says I can set the maximum number of characters in the
textbox.................

I have absolutely no idea how I can calculate that.

Help please.

Regards.




Tom Ogilvy" wrote in message
...
How about using the maxlength property.

--
Regards,
Tom Ogilvy


"Stuart" wrote in message
...
Oops, just discovered a flaw (probably one of many to come).
The form is designed to represent an A4 page in portrait mode, where
basically the bottom two thirds are occupied by one large textbox.

If I go into this textbox and keep pressing Enter, I can get to the

very
bottom of the textbox and I can enter text.

But if I then press Enter the textbox scrolls up the form,
giving the user the impression that the textbox is expanding to meet

the
user's needs.

Can I stop this, please?

Regards.










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default Userform Textbox - fundamental flaw

Many thanks for that, but I don't think this is leading me in the right
direction.

Here's what I have now:
a multiline textbox set to Times New Roman (size 12)
text is Bold, wraptext is enabled. The Enter and Tab
keys are enabled. When the form displays, I can press
the Enter down to line 29 before the textbox begins to
scroll --- this is the bottom-most line of the printed
output.
If the user types anywhere after this line, then the top lines
in the textbox will be omitted from the printed copy. So I
wish to limit usage to this line.
Thus user could use Enter and Tab to get to the very end
of line 29 and say type a W (there would be no characters before the W), but
the form would then not scroll, despite their only being one visible
character in the
form.

Can this be done, please?

Regards and thanks.

NickHK" wrote in message
...
Stuart,
Using a fixed width font will make this easier.
If you must use a proportional width font, fill the text box with "W" and
use that number of caharacters.

NickHK

"Stuart" wrote in message
...
Perhaps not as simple, as simple me, first thought.

The textbox's height property is set to 419.25 (which I believe is a
value
in points) and the width to 102.
The Font is set to Times New Roman, FontSize to 12 and Bold.

Help for MaxLength gives one option:
MaxLength Property (Forms)
which says I can set the maximum number of characters in the
textbox.................

I have absolutely no idea how I can calculate that.

Help please.

Regards.




Tom Ogilvy" wrote in message
...
How about using the maxlength property.

--
Regards,
Tom Ogilvy


"Stuart" wrote in message
...
Oops, just discovered a flaw (probably one of many to come).
The form is designed to represent an A4 page in portrait mode, where
basically the bottom two thirds are occupied by one large textbox.

If I go into this textbox and keep pressing Enter, I can get to the

very
bottom of the textbox and I can enter text.

But if I then press Enter the textbox scrolls up the form,
giving the user the impression that the textbox is expanding to meet

the
user's needs.

Can I stop this, please?

Regards.










  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Userform Textbox - fundamental flaw

Stuart,
May be this help then.

http://vbnet.mvps.org/code/textapi/txboxlines.htm

NickHK

"Stuart" wrote in message
...
Many thanks for that, but I don't think this is leading me in the right
direction.

Here's what I have now:
a multiline textbox set to Times New Roman (size 12)
text is Bold, wraptext is enabled. The Enter and Tab
keys are enabled. When the form displays, I can press
the Enter down to line 29 before the textbox begins to
scroll --- this is the bottom-most line of the printed
output.
If the user types anywhere after this line, then the top lines
in the textbox will be omitted from the printed copy. So I
wish to limit usage to this line.
Thus user could use Enter and Tab to get to the very end
of line 29 and say type a W (there would be no characters before the W),

but
the form would then not scroll, despite their only being one visible
character in the
form.

Can this be done, please?

Regards and thanks.

NickHK" wrote in message
...
Stuart,
Using a fixed width font will make this easier.
If you must use a proportional width font, fill the text box with "W"

and
use that number of caharacters.

NickHK

"Stuart" wrote in message
...
Perhaps not as simple, as simple me, first thought.

The textbox's height property is set to 419.25 (which I believe is a
value
in points) and the width to 102.
The Font is set to Times New Roman, FontSize to 12 and Bold.

Help for MaxLength gives one option:
MaxLength Property (Forms)
which says I can set the maximum number of characters in the
textbox.................

I have absolutely no idea how I can calculate that.

Help please.

Regards.




Tom Ogilvy" wrote in message
...
How about using the maxlength property.

--
Regards,
Tom Ogilvy


"Stuart" wrote in message
...
Oops, just discovered a flaw (probably one of many to come).
The form is designed to represent an A4 page in portrait mode, where
basically the bottom two thirds are occupied by one large textbox.

If I go into this textbox and keep pressing Enter, I can get to the

very
bottom of the textbox and I can enter text.

But if I then press Enter the textbox scrolls up the form,
giving the user the impression that the textbox is expanding to meet

the
user's needs.

Can I stop this, please?

Regards.












  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default Userform Textbox - fundamental flaw

Thanks. I'm trying to make it work, but it fails on the line beginning:
lineCount =
with the message "Method or data member not found"
..hwnd is highlighted.
Can I adapt this for VBA?

Regards.

"NickHK" wrote in message
...
Stuart,
May be this help then.

http://vbnet.mvps.org/code/textapi/txboxlines.htm

NickHK

"Stuart" wrote in message
...
Many thanks for that, but I don't think this is leading me in the right
direction.

Here's what I have now:
a multiline textbox set to Times New Roman (size 12)
text is Bold, wraptext is enabled. The Enter and Tab
keys are enabled. When the form displays, I can press
the Enter down to line 29 before the textbox begins to
scroll --- this is the bottom-most line of the printed
output.
If the user types anywhere after this line, then the top lines
in the textbox will be omitted from the printed copy. So I
wish to limit usage to this line.
Thus user could use Enter and Tab to get to the very end
of line 29 and say type a W (there would be no characters before the W),

but
the form would then not scroll, despite their only being one visible
character in the
form.

Can this be done, please?

Regards and thanks.

NickHK" wrote in message
...
Stuart,
Using a fixed width font will make this easier.
If you must use a proportional width font, fill the text box with "W"

and
use that number of caharacters.

NickHK

"Stuart" wrote in message
...
Perhaps not as simple, as simple me, first thought.

The textbox's height property is set to 419.25 (which I believe is a
value
in points) and the width to 102.
The Font is set to Times New Roman, FontSize to 12 and Bold.

Help for MaxLength gives one option:
MaxLength Property (Forms)
which says I can set the maximum number of characters in the
textbox.................

I have absolutely no idea how I can calculate that.

Help please.

Regards.




Tom Ogilvy" wrote in message
...
How about using the maxlength property.

--
Regards,
Tom Ogilvy


"Stuart" wrote in message
...
Oops, just discovered a flaw (probably one of many to come).
The form is designed to represent an A4 page in portrait mode,
where
basically the bottom two thirds are occupied by one large textbox.

If I go into this textbox and keep pressing Enter, I can get to the
very
bottom of the textbox and I can enter text.

But if I then press Enter the textbox scrolls up the form,
giving the user the impression that the textbox is expanding to
meet
the
user's needs.

Can I stop this, please?

Regards.














  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Userform Textbox - fundamental flaw

Stuart,
Sorry forgot you're in VBA.
How about a RichTextBox instead. It has a .HWnd property.

NickHK


"Stuart" wrote in message
...
Thanks. I'm trying to make it work, but it fails on the line beginning:
lineCount =
with the message "Method or data member not found"
.hwnd is highlighted.
Can I adapt this for VBA?

Regards.

"NickHK" wrote in message
...
Stuart,
May be this help then.

http://vbnet.mvps.org/code/textapi/txboxlines.htm

NickHK

"Stuart" wrote in message
...
Many thanks for that, but I don't think this is leading me in the right
direction.

Here's what I have now:
a multiline textbox set to Times New Roman (size 12)
text is Bold, wraptext is enabled. The Enter and Tab
keys are enabled. When the form displays, I can press
the Enter down to line 29 before the textbox begins to
scroll --- this is the bottom-most line of the printed
output.
If the user types anywhere after this line, then the top lines
in the textbox will be omitted from the printed copy. So I
wish to limit usage to this line.
Thus user could use Enter and Tab to get to the very end
of line 29 and say type a W (there would be no characters before the

W),
but
the form would then not scroll, despite their only being one visible
character in the
form.

Can this be done, please?

Regards and thanks.

NickHK" wrote in message
...
Stuart,
Using a fixed width font will make this easier.
If you must use a proportional width font, fill the text box with "W"

and
use that number of caharacters.

NickHK

"Stuart" wrote in message
...
Perhaps not as simple, as simple me, first thought.

The textbox's height property is set to 419.25 (which I believe is a
value
in points) and the width to 102.
The Font is set to Times New Roman, FontSize to 12 and Bold.

Help for MaxLength gives one option:
MaxLength Property (Forms)
which says I can set the maximum number of characters in the
textbox.................

I have absolutely no idea how I can calculate that.

Help please.

Regards.




Tom Ogilvy" wrote in message
...
How about using the maxlength property.

--
Regards,
Tom Ogilvy


"Stuart" wrote in message
...
Oops, just discovered a flaw (probably one of many to come).
The form is designed to represent an A4 page in portrait mode,
where
basically the bottom two thirds are occupied by one large

textbox.

If I go into this textbox and keep pressing Enter, I can get to

the
very
bottom of the textbox and I can enter text.

But if I then press Enter the textbox scrolls up the form,
giving the user the impression that the textbox is expanding to
meet
the
user's needs.

Can I stop this, please?

Regards.
















  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default Userform Textbox - fundamental flaw

I'll give it a try, but can't see anything in Help about it.

Regards.

"NickHK" wrote in message
...
Stuart,
Sorry forgot you're in VBA.
How about a RichTextBox instead. It has a .HWnd property.

NickHK


"Stuart" wrote in message
...
Thanks. I'm trying to make it work, but it fails on the line beginning:
lineCount =
with the message "Method or data member not found"
.hwnd is highlighted.
Can I adapt this for VBA?

Regards.

"NickHK" wrote in message
...
Stuart,
May be this help then.

http://vbnet.mvps.org/code/textapi/txboxlines.htm

NickHK

"Stuart" wrote in message
...
Many thanks for that, but I don't think this is leading me in the
right
direction.

Here's what I have now:
a multiline textbox set to Times New Roman (size 12)
text is Bold, wraptext is enabled. The Enter and Tab
keys are enabled. When the form displays, I can press
the Enter down to line 29 before the textbox begins to
scroll --- this is the bottom-most line of the printed
output.
If the user types anywhere after this line, then the top lines
in the textbox will be omitted from the printed copy. So I
wish to limit usage to this line.
Thus user could use Enter and Tab to get to the very end
of line 29 and say type a W (there would be no characters before the

W),
but
the form would then not scroll, despite their only being one visible
character in the
form.

Can this be done, please?

Regards and thanks.

NickHK" wrote in message
...
Stuart,
Using a fixed width font will make this easier.
If you must use a proportional width font, fill the text box with
"W"
and
use that number of caharacters.

NickHK

"Stuart" wrote in message
...
Perhaps not as simple, as simple me, first thought.

The textbox's height property is set to 419.25 (which I believe is
a
value
in points) and the width to 102.
The Font is set to Times New Roman, FontSize to 12 and Bold.

Help for MaxLength gives one option:
MaxLength Property (Forms)
which says I can set the maximum number of characters in the
textbox.................

I have absolutely no idea how I can calculate that.

Help please.

Regards.




Tom Ogilvy" wrote in message
...
How about using the maxlength property.

--
Regards,
Tom Ogilvy


"Stuart" wrote in message
...
Oops, just discovered a flaw (probably one of many to come).
The form is designed to represent an A4 page in portrait mode,
where
basically the bottom two thirds are occupied by one large

textbox.

If I go into this textbox and keep pressing Enter, I can get to

the
very
bottom of the textbox and I can enter text.

But if I then press Enter the textbox scrolls up the form,
giving the user the impression that the textbox is expanding to
meet
the
user's needs.

Can I stop this, please?

Regards.




















  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Userform Textbox - fundamental flaw

It isn't distributed with Excel.


Here are some sources of INFO:

http://support.microsoft.com/default...b;en-us;838010
Problems occur when you use the Rich TextBox Control 6.0 in Office XP and in
Office 2003

http://support.microsoft.com/default...b;en-us;236286
Out of memory error message using the Rich Textbox control

http://support.microsoft.com/default...b;en-us;297391
OFFXPDEV: ActiveX Controls That Are Included with Microsoft Office XP
Developer

http://support.microsoft.com/default...b;en-us;257849
How To Resize RichTextbox Control with Endless Bottom



http://www.developerfusion.com/show/16/


--
Regards,
Tom Ogilvy

"Stuart" wrote in message
...
I'll give it a try, but can't see anything in Help about it.

Regards.

"NickHK" wrote in message
...
Stuart,
Sorry forgot you're in VBA.
How about a RichTextBox instead. It has a .HWnd property.

NickHK


"Stuart" wrote in message
...
Thanks. I'm trying to make it work, but it fails on the line beginning:
lineCount =
with the message "Method or data member not found"
.hwnd is highlighted.
Can I adapt this for VBA?

Regards.

"NickHK" wrote in message
...
Stuart,
May be this help then.

http://vbnet.mvps.org/code/textapi/txboxlines.htm

NickHK

"Stuart" wrote in message
...
Many thanks for that, but I don't think this is leading me in the
right
direction.

Here's what I have now:
a multiline textbox set to Times New Roman (size 12)
text is Bold, wraptext is enabled. The Enter and Tab
keys are enabled. When the form displays, I can press
the Enter down to line 29 before the textbox begins to
scroll --- this is the bottom-most line of the printed
output.
If the user types anywhere after this line, then the top lines
in the textbox will be omitted from the printed copy. So I
wish to limit usage to this line.
Thus user could use Enter and Tab to get to the very end
of line 29 and say type a W (there would be no characters before the

W),
but
the form would then not scroll, despite their only being one visible
character in the
form.

Can this be done, please?

Regards and thanks.

NickHK" wrote in message
...
Stuart,
Using a fixed width font will make this easier.
If you must use a proportional width font, fill the text box with
"W"
and
use that number of caharacters.

NickHK

"Stuart" wrote in message
...
Perhaps not as simple, as simple me, first thought.

The textbox's height property is set to 419.25 (which I believe

is
a
value
in points) and the width to 102.
The Font is set to Times New Roman, FontSize to 12 and Bold.

Help for MaxLength gives one option:
MaxLength Property (Forms)
which says I can set the maximum number of characters in the
textbox.................

I have absolutely no idea how I can calculate that.

Help please.

Regards.




Tom Ogilvy" wrote in message
...
How about using the maxlength property.

--
Regards,
Tom Ogilvy


"Stuart" wrote in message
...
Oops, just discovered a flaw (probably one of many to come).
The form is designed to represent an A4 page in portrait mode,
where
basically the bottom two thirds are occupied by one large

textbox.

If I go into this textbox and keep pressing Enter, I can get

to
the
very
bottom of the textbox and I can enter text.

But if I then press Enter the textbox scrolls up the form,
giving the user the impression that the textbox is expanding

to
meet
the
user's needs.

Can I stop this, please?

Regards.




















  #12   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default Userform Textbox - fundamental flaw

Wondered about that.

Thanks again for your help/time.

Regards.

"Tom Ogilvy" wrote in message
...
It isn't distributed with Excel.


Here are some sources of INFO:

http://support.microsoft.com/default...b;en-us;838010
Problems occur when you use the Rich TextBox Control 6.0 in Office XP and
in
Office 2003

http://support.microsoft.com/default...b;en-us;236286
Out of memory error message using the Rich Textbox control

http://support.microsoft.com/default...b;en-us;297391
OFFXPDEV: ActiveX Controls That Are Included with Microsoft Office XP
Developer

http://support.microsoft.com/default...b;en-us;257849
How To Resize RichTextbox Control with Endless Bottom



http://www.developerfusion.com/show/16/


--
Regards,
Tom Ogilvy

"Stuart" wrote in message
...
I'll give it a try, but can't see anything in Help about it.

Regards.

"NickHK" wrote in message
...
Stuart,
Sorry forgot you're in VBA.
How about a RichTextBox instead. It has a .HWnd property.

NickHK


"Stuart" wrote in message
...
Thanks. I'm trying to make it work, but it fails on the line
beginning:
lineCount =
with the message "Method or data member not found"
.hwnd is highlighted.
Can I adapt this for VBA?

Regards.

"NickHK" wrote in message
...
Stuart,
May be this help then.

http://vbnet.mvps.org/code/textapi/txboxlines.htm

NickHK

"Stuart" wrote in message
...
Many thanks for that, but I don't think this is leading me in the
right
direction.

Here's what I have now:
a multiline textbox set to Times New Roman (size 12)
text is Bold, wraptext is enabled. The Enter and Tab
keys are enabled. When the form displays, I can press
the Enter down to line 29 before the textbox begins to
scroll --- this is the bottom-most line of the printed
output.
If the user types anywhere after this line, then the top lines
in the textbox will be omitted from the printed copy. So I
wish to limit usage to this line.
Thus user could use Enter and Tab to get to the very end
of line 29 and say type a W (there would be no characters before
the
W),
but
the form would then not scroll, despite their only being one
visible
character in the
form.

Can this be done, please?

Regards and thanks.

NickHK" wrote in message
...
Stuart,
Using a fixed width font will make this easier.
If you must use a proportional width font, fill the text box with
"W"
and
use that number of caharacters.

NickHK

"Stuart" wrote in message
...
Perhaps not as simple, as simple me, first thought.

The textbox's height property is set to 419.25 (which I believe

is
a
value
in points) and the width to 102.
The Font is set to Times New Roman, FontSize to 12 and Bold.

Help for MaxLength gives one option:
MaxLength Property (Forms)
which says I can set the maximum number of characters in the
textbox.................

I have absolutely no idea how I can calculate that.

Help please.

Regards.




Tom Ogilvy" wrote in message
...
How about using the maxlength property.

--
Regards,
Tom Ogilvy


"Stuart" wrote in message
...
Oops, just discovered a flaw (probably one of many to come).
The form is designed to represent an A4 page in portrait
mode,
where
basically the bottom two thirds are occupied by one large
textbox.

If I go into this textbox and keep pressing Enter, I can get

to
the
very
bottom of the textbox and I can enter text.

But if I then press Enter the textbox scrolls up the form,
giving the user the impression that the textbox is expanding

to
meet
the
user's needs.

Can I stop this, please?

Regards.






















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
TEXTBOX in USERFORM RUUD VAN DEURSEN Excel Programming 5 March 1st 05 03:36 PM
userform textbox Phil Excel Worksheet Functions 5 January 16th 05 06:59 PM
Textbox in userform Harald Staff Excel Programming 0 September 8th 04 11:51 AM
Textbox in userform shaharul[_6_] Excel Programming 3 April 15th 04 12:54 PM
UserForm TextBox to ActiveSheet TextBox over 256 characters Dan E[_2_] Excel Programming 1 July 28th 03 07:36 PM


All times are GMT +1. The time now is 01:20 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"