Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 19-08-2010
Member
 
Join Date: Aug 2010
Location: Malvern UK
Posts: 3
Excel/VBA: Copying text from UserForm Textbox to a Worksheet Textbox

Hi,

VBA in Excel 2003:

Using code I'm trying to copy text entered by the User in a UserForm
textbox to a worksheet textbox that has just been created. My code
seems unable to paste more than a certain number of characters, ie. if
there are more than about a hundred characters, (I have not yet
counted) nothing gets entered into the Worksheet textbox. However, if
I manually copy and paste, (Ctrl C, Ctrl V) from one to the other all
of the text copies.


Here are my two lines that create a textbox on the worksheet then
(should) copy the text from my UserForm Textbox.

ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 124#,
134#, 100, 100).Select

Selection.Characters.Text = UserForm.TextBox1.Text

Do you have any ideas what's wrong here?

Many thanks.

--
Neil Ives
Reply With Quote
  #2  
Old 20-08-2010
Member
 
Join Date: Feb 2010
Posts: 533
Re: Excel/VBA: Copying text from UserForm Textbox to a Worksheet Textbox

There is a control called Microsoft Spreadsheet (right click on the toolbox , additional controls ) place this control on the userform and a label, if Excel file, do:
Label1.Visible = False
Spreadsheet1.Visible = True
and paste the beach in the Spreadsheet Control

If Word file, do :
Label1.Visible = True
Spreadsheet1.Visible = False
and paste the paragraph in the label.
Reply With Quote
  #3  
Old 20-08-2010
Member
 
Join Date: Aug 2010
Location: Malvern UK
Posts: 3
Re: Excel/VBA: Copying text from UserForm Textbox to a Worksheet Textbox

Thank you for your reply Anirvinya.

During the day I have discovered what the problem was and I've coded a solution.
Here's the page that gave me the information I needed.

http://support.microsoft.com/kb/105416

--
Neil Ives
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Excel/VBA: Copying text from UserForm Textbox to a Worksheet Textbox"
Thread Thread Starter Forum Replies Last Post
Clicking on Worksheet on multiple Worksheets in the single Excel file not allow viewing the worksheet in Microsoft Excel 2010 Dipanwita Windows Software 8 04-12-2011 11:24 AM
Reading text file in VC++ display it in textbox molocas Software Development 1 26-07-2010 10:34 AM
Textbox validation in ASP.NET Kasper Software Development 4 19-01-2010 08:28 PM
Problem of textbox that does not display text RyanInt Software Development 4 11-12-2009 05:55 PM
Moving from one TextBox to another with TAB GeforceUser Software Development 3 05-11-2009 06:31 PM


All times are GMT +5.5. The time now is 04:06 PM.