V
Very Basic User
Hello All, My code below is rather lenghty to just print several graphs, but
I still have a problem. This is used by many people within the plant. The
code only works on a few computers. I tried to record a simple print macro on
the ones that it does not work on and found what I think my problem is. (The
Ne04) used on my computer... I've since looked at many pc's and have found
ranged from Ne01 through Ne08. Is there a simple change that I can add that
all users will be able to run the macro successfully from any pc?
Thanks in advance,
John
Sub EditedPrintAll()
'
' EditedPrintAll Macro
'
'
Selection.ShapeRange.Item(1).Hyperlink.Follow NewWindow:=False,
AddHistory _
:=True
Range("A1").Select
Application.ActivePrinter = "\\mrafp1\MRA-ADMINCP1 on Ne04:"
ExecuteExcel4Macro _
"PRINT(1,,,1,,,,,,,,2,""\\mrafp1\MRA-ADMINCP1 on
Ne04:"",,TRUE,,FALSE)"
Sheets("Line 3 Graph").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
Sheets("Line 6 Graph").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
Sheets("Line 9 Graph").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
Sheets("Line 10 Graph").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
Sheets("Line 2 Graph").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
Sheets("Line 5 Graph ").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
Sheets("Line 7 Graph").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
Sheets("Line 8 Graph").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
Selection.ShapeRange.Item(1).Hyperlink.Follow NewWindow:=False,
AddHistory _
:=True
Range("A1").Select
End Sub
I still have a problem. This is used by many people within the plant. The
code only works on a few computers. I tried to record a simple print macro on
the ones that it does not work on and found what I think my problem is. (The
Ne04) used on my computer... I've since looked at many pc's and have found
ranged from Ne01 through Ne08. Is there a simple change that I can add that
all users will be able to run the macro successfully from any pc?
Thanks in advance,
John
Sub EditedPrintAll()
'
' EditedPrintAll Macro
'
'
Selection.ShapeRange.Item(1).Hyperlink.Follow NewWindow:=False,
AddHistory _
:=True
Range("A1").Select
Application.ActivePrinter = "\\mrafp1\MRA-ADMINCP1 on Ne04:"
ExecuteExcel4Macro _
"PRINT(1,,,1,,,,,,,,2,""\\mrafp1\MRA-ADMINCP1 on
Ne04:"",,TRUE,,FALSE)"
Sheets("Line 3 Graph").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
Sheets("Line 6 Graph").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
Sheets("Line 9 Graph").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
ActiveWindow.ScrollWorkbookTabs Sheets:=1
Sheets("Line 10 Graph").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
Sheets("Line 2 Graph").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
Sheets("Line 5 Graph ").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
Sheets("Line 7 Graph").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
Sheets("Line 8 Graph").Select
Range("A1").Select
ExecuteExcel4Macro "PRINT(1,,,1,,,,,,,,2,,,TRUE,,FALSE)"
Selection.ShapeRange.Item(1).Hyperlink.Follow NewWindow:=False,
AddHistory _
:=True
Range("A1").Select
End Sub