Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 23rd, 2005, 04:17 AM
Registered User
 
Join Date: Sep 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Place text strings in a text box

Hi, I recently bought the Excel 2003 VBA book from Wrox to get some support about VBA in Excel. Despite the information and tips out the book, I still can’t solve a problem. I want to merge twenty-five text strings in a text box. These text strings are generated from another sheet and are changed automatically. Is there a way to make a macro, which will place these merged text strings, automatic in the text box?
Thanks in advance



 
Old October 6th, 2005, 05:26 AM
Authorized User
 
Join Date: Feb 2005
Posts: 85
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Depending on where your data comes from, try this:
The subroutine below here can be made in the Sheets-code in VBE.
The worksheet must also be the sheet where the changes are made.

Private Sub Worksheet_Change(ByVal Target As Range)

For i = 1 to enddata
   newstrg = Sheet2.Cells(i,1).Value
   strng = strng & newstrg
next i
Sheet1.Textbox1.text = strng
End Sub







Similar Threads
Thread Thread Starter Forum Replies Last Post
Text Box .text Property Displays conflicting Valus JPOhlman Visual Basic 2005 Basics 3 August 23rd, 2006 02:39 PM
Can't set text property of dynamic text box sreerajrs ASP.NET 1.0 and 1.1 Professional 1 May 31st, 2006 09:39 PM
insert text into a text box by selecting an link gavmc Other Programming Languages 0 February 15th, 2006 09:46 AM
Changing between bold and plain text in a text box funkybuddha Access 2 January 3rd, 2006 10:15 AM
Extract text from text file & put in dropdown box tsukey Beginning PHP 5 July 20th, 2004 09:49 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.