View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
salgud salgud is offline
external usenet poster
 
Posts: 219
Default userform incorporates string data

On Thu, 31 Jul 2008 08:21:00 -0700, JLGWhiz wrote:

The example was to illustrate how to get the string variable stored with a
message into another variable. You can then take that variable and use it
anywhere in the code to reproduce the message.

Sub UserForm1_Initialize()
Dim msg As String
msg = "The client's " & TRID & " is not in the datbase." _
& vbCrLf Do you want to add them?"
TextBox1.Text = msg
Label1.Text = msg
UserForm1.Caption = msg
End Sub

As you see, it can be put in several places of your choice once stored in
the variable. The variable "msg" just makes it easier to use without having
to retype the entire phrase each time. Maybe I don't understand what you are
after.

Ok, I see what you're saying now. Thanks!