J
JBoulton
I use this code to test for workbook name and run the appropriate print
routine.
How can I call the regular Excel ctrl-p for workbooks that are not part of
my project instead of just a beep at the end?
Sub ProjectPrint()
'
' Keyboard Shortcut: Ctrl+p
Dim FileName As String, Length As Integer, FileClass As String
On Error GoTo EndIt
FileName = ActiveWorkbook.name
Length = Len(FileName)
FileClass = Left(FileName, Length - 4)
Length = Len(FileClass)
FileClass = Right(FileClass, Length - 4)
ProcName = "Do" + FileClass + "Print"
Run ProcName
End
EndIt:
Beep
End Sub
TIA, Jim
routine.
How can I call the regular Excel ctrl-p for workbooks that are not part of
my project instead of just a beep at the end?
Sub ProjectPrint()
'
' Keyboard Shortcut: Ctrl+p
Dim FileName As String, Length As Integer, FileClass As String
On Error GoTo EndIt
FileName = ActiveWorkbook.name
Length = Len(FileName)
FileClass = Left(FileName, Length - 4)
Length = Len(FileClass)
FileClass = Right(FileClass, Length - 4)
ProcName = "Do" + FileClass + "Print"
Run ProcName
End
EndIt:
Beep
End Sub
TIA, Jim