Vba Printing With If Statement Follow
I am trying to automate the closing of Bartender with Excel VBA code. Basically, if the operator presses the "Print" button on the print dialoug screen, I was the program to close. But I want the operator to pull the print dialoug screen up them selves and the VBA code wait on the operator's input. This is what I have so far:
Public Sub test()
Dim btApp As BarTender.Application
Dim btFormat As BarTender.Format
Set btApp = New BarTender.Application
Set btFormat = New BarTender.Format
btApp.Formats.Open ("K:\EpilogLaser\Program Draft folder - UNRELEASED\351000 KIT.btw")
btApp.Visible = True
btApp.ActiveFormat.IdenticalCopiesOfLabel = 1
If btFormats = btApp.ActiveFormat.PrintOut(True, Flase) = True Then
Msg "Program not sent to Epilog Laser Marker"
It almost works except that this code automatically brings the print dialoug screen up. Any suggestions?
Please sign in to leave a comment.