Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Managing Textboxes in a Worksheet

I have inserted textboxes in merged cell ranges as a way around Excel's cell
character count restrictions. There are ten worksheets with multiple
textboxes. Three questions:

1.) Is there a way to automatically size this textbox to the merged cell
range size?
2.) How could I keep the user from resizing or moving the textbox? They
should only be allowed to type text in it.
3.) Can/should this be done with code?

Without resolving issues 1 and 2, the worksheets will get pretty messy, as
there are about six of these textboxes in each worksheet.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Managing Textboxes in a Worksheet

Automatically size the textbox - no
You can of course do it with code.

you can protect the sheet to keep the user from making changes.

--
Regards,
Tom Ogilvy


"Phil H" wrote:

I have inserted textboxes in merged cell ranges as a way around Excel's cell
character count restrictions. There are ten worksheets with multiple
textboxes. Three questions:

1.) Is there a way to automatically size this textbox to the merged cell
range size?
2.) How could I keep the user from resizing or moving the textbox? They
should only be allowed to type text in it.
3.) Can/should this be done with code?

Without resolving issues 1 and 2, the worksheets will get pretty messy, as
there are about six of these textboxes in each worksheet.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Managing Textboxes in a Worksheet

Tom, Thanks for your answer.

What I planned was a text box with a scroll bar that users could type text
into. But I also know how this can get very sloppy because of user
carelessness. Could you suggest code to size the textbox? I do plan to
protect the worksheet - will the user still be able to make textbox entries?

Thanks, Phil

"Tom Ogilvy" wrote:

Automatically size the textbox - no
You can of course do it with code.

you can protect the sheet to keep the user from making changes.

--
Regards,
Tom Ogilvy


"Phil H" wrote:

I have inserted textboxes in merged cell ranges as a way around Excel's cell
character count restrictions. There are ten worksheets with multiple
textboxes. Three questions:

1.) Is there a way to automatically size this textbox to the merged cell
range size?
2.) How could I keep the user from resizing or moving the textbox? They
should only be allowed to type text in it.
3.) Can/should this be done with code?

Without resolving issues 1 and 2, the worksheets will get pretty messy, as
there are about six of these textboxes in each worksheet.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Managing Textboxes in a Worksheet

Assuming a textbox from the control toolbox toolbar

yes, if the sheet is protected, the user can still type in the textbox

Sub AAtester2()
Set sh = ActiveSheet
With sh.Range("B9").MergeArea
sh.TextBox1.Left = .Left
sh.TextBox1.Top = .Top
sh.TextBox1.Width = .Width
sh.TextBox1.Height = .Height
End With
End Sub

--
Regards,
Tom Ogilvy

"Phil H" wrote:

Tom, Thanks for your answer.

What I planned was a text box with a scroll bar that users could type text
into. But I also know how this can get very sloppy because of user
carelessness. Could you suggest code to size the textbox? I do plan to
protect the worksheet - will the user still be able to make textbox entries?

Thanks, Phil

"Tom Ogilvy" wrote:

Automatically size the textbox - no
You can of course do it with code.

you can protect the sheet to keep the user from making changes.

--
Regards,
Tom Ogilvy


"Phil H" wrote:

I have inserted textboxes in merged cell ranges as a way around Excel's cell
character count restrictions. There are ten worksheets with multiple
textboxes. Three questions:

1.) Is there a way to automatically size this textbox to the merged cell
range size?
2.) How could I keep the user from resizing or moving the textbox? They
should only be allowed to type text in it.
3.) Can/should this be done with code?

Without resolving issues 1 and 2, the worksheets will get pretty messy, as
there are about six of these textboxes in each worksheet.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Managing Textboxes in a Worksheet

This is what I needed - thanks for the help, Tom.

"Tom Ogilvy" wrote:

Assuming a textbox from the control toolbox toolbar

yes, if the sheet is protected, the user can still type in the textbox

Sub AAtester2()
Set sh = ActiveSheet
With sh.Range("B9").MergeArea
sh.TextBox1.Left = .Left
sh.TextBox1.Top = .Top
sh.TextBox1.Width = .Width
sh.TextBox1.Height = .Height
End With
End Sub

--
Regards,
Tom Ogilvy

"Phil H" wrote:

Tom, Thanks for your answer.

What I planned was a text box with a scroll bar that users could type text
into. But I also know how this can get very sloppy because of user
carelessness. Could you suggest code to size the textbox? I do plan to
protect the worksheet - will the user still be able to make textbox entries?

Thanks, Phil

"Tom Ogilvy" wrote:

Automatically size the textbox - no
You can of course do it with code.

you can protect the sheet to keep the user from making changes.

--
Regards,
Tom Ogilvy


"Phil H" wrote:

I have inserted textboxes in merged cell ranges as a way around Excel's cell
character count restrictions. There are ten worksheets with multiple
textboxes. Three questions:

1.) Is there a way to automatically size this textbox to the merged cell
range size?
2.) How could I keep the user from resizing or moving the textbox? They
should only be allowed to type text in it.
3.) Can/should this be done with code?

Without resolving issues 1 and 2, the worksheets will get pretty messy, as
there are about six of these textboxes in each worksheet.

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
Protecting/managing links from my worksheet GWilson Excel Discussion (Misc queries) 1 July 29th 08 11:23 PM
aligning textboxes on worksheet by cell reference? dreamz[_25_] Excel Programming 1 November 3rd 05 08:00 PM
Q: most efficient way to feed textboxes from worksheet and vice versa count Excel Programming 2 October 30th 05 04:45 PM
Textboxes on a worksheet Ian Collard Excel Programming 2 May 4th 04 05:00 PM
how do I link Textboxes in a userform to a Cell in a Worksheet? Paul Clark Excel Programming 2 January 17th 04 05:16 PM


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