Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi I have the following code in a workbook: Code: -------------------- 'takes data from cell A45 (Phase Instructions worksheet) and puts into textbox Private Sub CreateEmail_Click() On Error GoTo ErrHandler Dim strText As String For Each r In Sheets("Phase instructions").Range("A45").Rows strText = "" For Each c In r.Cells strText = strText & c.Value Next c EmailSubject = EmailSubject & strText & vbCrLf Next r ExitPoint: Exit Sub ErrHandler: If Err.Number = 999 Then Resume Next Else MsgBox "Incorrect data for this printer, please re-enter", vbCritical, "PRINTER DATA ERROR" Resume ExitPoint End If End Sub -------------------- I would like for the button to fill another text box (called EmailBody) at the same time, but I don't know how to get it to fill the two boxes. Can anyone please advise me on what I need to change in the above code to get this to work? Thanks very much CC -- Charlie Chalk ------------------------------------------------------------------------ Charlie Chalk's Profile: http://www.excelforum.com/member.php...o&userid=32776 View this thread: http://www.excelforum.com/showthread...hreadid=526052 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Align Text in Command button | Excel Discussion (Misc queries) | |||
Entering Variable Text in Text Boxes...... | Excel Discussion (Misc queries) | |||
Command button text | Excel Discussion (Misc queries) | |||
Enable Command Button After Entering Text | New Users to Excel | |||
Strange behavior w/ Text, Button, & Check Boxes | Excel Discussion (Misc queries) |