E
ewagz
I am taking the data from a userform to a comment on the cell the is
currently active. I am running into some errors using the following code
close to the end where the data is concantenated. What I need to do is a
carriage return....I thought that might be CHAR(10) within the comments area
so the outcome in the comments area might look something like this:
Customer name:
DOA:
CC#:
EXP Date:
Days Staying:
Current code:
Private Sub Submit_Click()
Dim res As VbMsgBoxResult
If Custname.Text = "" Then
MsgBox "Please enter a valid name!", vbOKOnly
End If
If CCNo.Text = "" Then
res = MsgBox(Prompt:="Do you want to enter a CC for the customer?", _
Buttons:=vbYesNo + vbQuestion)
If res = vbYes Then user.Custinfo.Show
End If
custnm = Custname.Text
dtoa = DOA.Value
CCN = CCNo.Value
ds = DOS.Value
EX = Exp.Value
com = "Customer name: " & custnm & CHAR(10) & "DOA: " & dtoa & CHAR(10) &
"CC#: " & CCN & _
"EXP Date: " & EX & CHAR(10) & "Days Staying: " & ds
End Sub
Thanks in advance!
currently active. I am running into some errors using the following code
close to the end where the data is concantenated. What I need to do is a
carriage return....I thought that might be CHAR(10) within the comments area
so the outcome in the comments area might look something like this:
Customer name:
DOA:
CC#:
EXP Date:
Days Staying:
Current code:
Private Sub Submit_Click()
Dim res As VbMsgBoxResult
If Custname.Text = "" Then
MsgBox "Please enter a valid name!", vbOKOnly
End If
If CCNo.Text = "" Then
res = MsgBox(Prompt:="Do you want to enter a CC for the customer?", _
Buttons:=vbYesNo + vbQuestion)
If res = vbYes Then user.Custinfo.Show
End If
custnm = Custname.Text
dtoa = DOA.Value
CCN = CCNo.Value
ds = DOS.Value
EX = Exp.Value
com = "Customer name: " & custnm & CHAR(10) & "DOA: " & dtoa & CHAR(10) &
"CC#: " & CCN & _
"EXP Date: " & EX & CHAR(10) & "Days Staying: " & ds
End Sub
Thanks in advance!