Re: userform printing
- From: "Bob Phillips" <bob.NGs@xxxxxxxxxxxxx>
- Date: Tue, 19 Sep 2006 23:55:55 +0100
Something like
Worksheets("Receipt").Printout
--
HTH
Bob Phillips
(replace somewhere in email address with gmail if mailing direct)
"ewagz" <ewagz@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AF7989C5-290B-4EB7-9A79-60A4365605B0@xxxxxxxxxxxxxxxx
I have a userform that I am piecing together and I would like to include auserform.
checkbox control that would print a receipt using the info in the
The receipt would be another excel work*** inside the same workbook. Irt
think that I can use the checkbox to start a macro that will take the data
from the user form into my receipt template, but I don't know the code to
print from there. My current userform data looks like this:
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
custpn = Custno.Value
dtoa = TOA.Value
CCN = CCNo.Value
ds = DOS.Value
EX = Exp.Value
rt = rate.Value
rm = remarks.Value
com = "Customer: " & custnm & Chr(10) & "Phone #: " & custpn & Chr(10) &
"TOA: " & dtoa & _
Chr(10) & "Nights staying: " & ds & Chr(10) & "Rate: " &
& Chr(10) & "CC#: " & CCN & _
Chr(10) & "EXP Date: " & EX & Chr(10) & "Remarks: " & rm
ActiveCell.Range("A1").Select
ActiveCell.FormulaR1C1 = custnm
ActiveCell.AddComment com
ActiveCell.Comment.Shape.Height = 120
ActiveCell.Comment.Shape.Width = 160
Custinfo.Hide
Unload Me
End Sub
Any help would be appreciated! Thanks!
--
EW - Analyst
.
- Follow-Ups:
- Re: userform printing
- From: ewagz
- Re: userform printing
- Prev by Date: Validation list changes don't fire an event
- Next by Date: Re: Validation list changes don't fire an event
- Previous by thread: Validation list changes don't fire an event
- Next by thread: Re: userform printing
- Index(es):