nivasudeen
New Member
- Joined
- Apr 21, 2021
- Messages
- 4
- Office Version
- 2019
- Platform
- Windows
hi I am Nivasudeen Basheer Mohammed
I am new to vab now only I am learning vab
have created a new vab form I have some doubt pls help me
I have a print button
if I click the print button I want 3 copy of the same receipt in name of customer copy,office copy, data copy
and it wants to show last data last data in the receipt automatily pls help
automatic last data want to come in receipt
example
Private Sub Button6_Click()
If MsgBox("office COPY ", vbYesNo) = vbYes Then
Range("F2").Value = "Original Copy"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=True, IgnorePrintAreas:=False
End If
If MsgBox("Data COPY ", vbYesNo) = vbYes Then
Range("F2").Value = "Duplicate Copy"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=True, IgnorePrintAreas:=False
End If
If MsgBox("CUSTOMER COPY", vbYesNo) = vbYes Then
Range("F2").Value = "Triplicate Copy"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=True, IgnorePrintAreas:=False
End If
MsgBox "Printing Done"
End Sub
I am new to vab now only I am learning vab
have created a new vab form I have some doubt pls help me
I have a print button
if I click the print button I want 3 copy of the same receipt in name of customer copy,office copy, data copy
and it wants to show last data last data in the receipt automatily pls help
automatic last data want to come in receipt
VBA Code:
example
Private Sub Button6_Click()
If MsgBox("office COPY ", vbYesNo) = vbYes Then
Range("F2").Value = "Original Copy"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=True, IgnorePrintAreas:=False
End If
If MsgBox("Data COPY ", vbYesNo) = vbYes Then
Range("F2").Value = "Duplicate Copy"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=True, IgnorePrintAreas:=False
End If
If MsgBox("CUSTOMER COPY", vbYesNo) = vbYes Then
Range("F2").Value = "Triplicate Copy"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=1, Copies:=1, Collate _
:=True, IgnorePrintAreas:=False
End If
MsgBox "Printing Done"
End Sub