Subject: Place text strings in a text box
Posted By: error_help Post Date: 9/23/2005 4:17:34 AM
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



Reply By: maxpotters Reply Date: 10/6/2005 5:26:21 AM
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



Go to topic 35453

Return to index page 459
Return to index page 458
Return to index page 457
Return to index page 456
Return to index page 455
Return to index page 454
Return to index page 453
Return to index page 452
Return to index page 451
Return to index page 450