Anne Troy
06-11-2005, 07:34 AM
That's it.
How can I change the following code to print \\ MYRACING-LA\HP Color Laser if I28 or K28 are NOT blank?
Sub DataOutput()
' DataOutput Macro'
' Keyboard Shortcut: Ctrl+q
ChDrive "C"
ChDir "C:\MY"
' Sheets("Job_Sheet").Select
Application.ActivePrinter = "\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:", Collate:=True
Sheets("Data_Entry").Select
Range("B10").Select
FORGE = ActiveCell.Text
Sheets("Pro-Engineer").Select
Sheets("Pro-Engineer").Copy
ChDrive "A"
ActiveWorkbook.SaveAs Filename:=FORGE, FileFormat:=xlText, _
CreateBackup:=False
ChDrive "C"
ActiveWorkbook.Close
Sheets("Data_Entry").Select
Range("M28").Select
' If ActiveCell = "Y" Then
ChDir "C:\MY"
Sheets("Data_Entry").Select
Sheets("Job_Sheet").Select
Application.ActivePrinter = "\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:", Collate:=True
Sheets("print2").Select
Application.ActivePrinter = "\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:", Collate:=True
Sheets("print 1").Select
Application.ActivePrinter = "\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:", Collate:=True
Sheets("Data_Entry").Select
Range("L6").Select
If ActiveCell = "WIR" Then
Sheets("print 3").Select
Application.ActivePrinter = "\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:", Collate:=True
End If
Sheets("Data_Entry").Select
Range("A609").Select
If ActiveCell = "MANUAL VP'S." Then
myvar = Range("Data_Entry!C3").Value & ".MCL"
Sheets("SmartCAM2").Select
ChDrive "C"
ChDir "C:\MY\SMARTCAM"
Sheets("smartCAM2").Copy
ActiveWorkbook.SaveAs Filename:=myvar, FileFormat:=xlText, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
Else
myvar = Range("Data_Entry!C3").Value & ".MCL"
Sheets("SmartCAM").Select
ChDir "C:\MY\SMARTCAM"
Sheets("smartCAM").Copy
ActiveWorkbook.SaveAs Filename:=myvar, FileFormat:=xlText, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
End If
ActiveWorkbook.Close
Sheets("Data_Entry").Select
ChDir "C:\MY"
MYSUM = Application.Run("CONVERTT2!CONVERTT2")
MsgBox "MACRO RESULT: " & MYSUM
Range("C3").Select
myvar = ActiveCell.Value
ChDrive "O:"
ActiveWorkbook.SaveAs Filename:=myvar, FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=True, _
CreateBackup:=False
ChDrive "C:"
ChDir "C:\MY"
ActiveWorkbook.Close
ActiveWorkbook.Close Filename:="MYAVE2.XLS"
End Sub
How can I change the following code to print \\ MYRACING-LA\HP Color Laser if I28 or K28 are NOT blank?
Sub DataOutput()
' DataOutput Macro'
' Keyboard Shortcut: Ctrl+q
ChDrive "C"
ChDir "C:\MY"
' Sheets("Job_Sheet").Select
Application.ActivePrinter = "\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:", Collate:=True
Sheets("Data_Entry").Select
Range("B10").Select
FORGE = ActiveCell.Text
Sheets("Pro-Engineer").Select
Sheets("Pro-Engineer").Copy
ChDrive "A"
ActiveWorkbook.SaveAs Filename:=FORGE, FileFormat:=xlText, _
CreateBackup:=False
ChDrive "C"
ActiveWorkbook.Close
Sheets("Data_Entry").Select
Range("M28").Select
' If ActiveCell = "Y" Then
ChDir "C:\MY"
Sheets("Data_Entry").Select
Sheets("Job_Sheet").Select
Application.ActivePrinter = "\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:", Collate:=True
Sheets("print2").Select
Application.ActivePrinter = "\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:", Collate:=True
Sheets("print 1").Select
Application.ActivePrinter = "\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:", Collate:=True
Sheets("Data_Entry").Select
Range("L6").Select
If ActiveCell = "WIR" Then
Sheets("print 3").Select
Application.ActivePrinter = "\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"\\MYRACING-LA\OffieJet (file:///MYRACING-LAOffieJet) 9100 on Ne03:", Collate:=True
End If
Sheets("Data_Entry").Select
Range("A609").Select
If ActiveCell = "MANUAL VP'S." Then
myvar = Range("Data_Entry!C3").Value & ".MCL"
Sheets("SmartCAM2").Select
ChDrive "C"
ChDir "C:\MY\SMARTCAM"
Sheets("smartCAM2").Copy
ActiveWorkbook.SaveAs Filename:=myvar, FileFormat:=xlText, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
Else
myvar = Range("Data_Entry!C3").Value & ".MCL"
Sheets("SmartCAM").Select
ChDir "C:\MY\SMARTCAM"
Sheets("smartCAM").Copy
ActiveWorkbook.SaveAs Filename:=myvar, FileFormat:=xlText, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
End If
ActiveWorkbook.Close
Sheets("Data_Entry").Select
ChDir "C:\MY"
MYSUM = Application.Run("CONVERTT2!CONVERTT2")
MsgBox "MACRO RESULT: " & MYSUM
Range("C3").Select
myvar = ActiveCell.Value
ChDrive "O:"
ActiveWorkbook.SaveAs Filename:=myvar, FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=True, _
CreateBackup:=False
ChDrive "C:"
ChDir "C:\MY"
ActiveWorkbook.Close
ActiveWorkbook.Close Filename:="MYAVE2.XLS"
End Sub