muhammad susanto
Well-known Member
- Joined
- Jan 8, 2013
- Messages
- 2,077
- Office Version
- 365
- 2021
- Platform
- Windows
hi all..
i want this macro below can print or save in pdf format at multiple based record selected..
this macro code :
here this attachment file
https://app.box.com/s/19nsaj2e6ka1wxwnoiyfu0u6k1d9y0yr
any body would help me , greatly appreciated...
m.susanto
i want this macro below can print or save in pdf format at multiple based record selected..
this macro code :
Code:
[COLOR=#333333]Sub PrintPhoto()[/COLOR]<code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit;">Dim fromRecord, toRecord, answer, i As Integer
On Error Resume Next
fromRecord = InputBox("From record", "FROM", 1)
If fromRecord = 0 Or Not IsNumeric(fromRecord) Then Exit Sub
toRecord = InputBox("To record", "TO", fromRecord)
If toRecord < fromRecord Or Not IsNumeric(fromRecord) Then Exit Sub
answer = MsgBox("printing records" & fromRecord & " to " & toRecord, vbOKCancel, "PRINT")
If answer <> vbOK Then Exit Sub
For i = fromRecord To toRecord
[AM8] = i
With ActiveSheet
.PrintOut
.FitToPagesWide = 1
.FitToPagesTall = 1
End With
Next
</code>[COLOR=#333333]End Sub[/COLOR]
here this attachment file
https://app.box.com/s/19nsaj2e6ka1wxwnoiyfu0u6k1d9y0yr
any body would help me , greatly appreciated...
m.susanto