S
Steven M. Britton
I am trying this:
Sub MYTD_Summary()
Application.Run "\\arlfs03\shared\Engineering\ENG\BOM Archive\BOM
Macros.xls!MYTD_Summary"
End Sub
But I get a Run-time error '1004'
The macro '\\arlfs03\shared\Engineering\ENG\BOM Archive\BOM
Macros.xls!MYTD_Summary' cannot be found.
If I assign the macro to the object it works fine - It's an oval I drew
using the drawing tools in Excel, not a command button.
What am I missing?
This is the code from the BOM Marcos.xls File:
Sub MYTD_SUMMARY()
Range("AZ6").Select
Selection.End(xlToLeft).Select
ActiveCell.Offset(-1, 0).Select: ENDmonth = ActiveCell.Column - 2::
ActiveCell.Offset(0, 1).Select
ActiveCell.Offset(0, -1).Select: Period = ActiveCell.Value
If Left(Period, 4) = "C/O " Then
CHANGEmonth = ActiveCell.Column - 2
end if
If ActiveCell.Column = 2 Then CHANGEmonth = 0
Cells.Find(What:="DASHBOARD SNAPSHOT", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByColumns,
SearchDirection:= _
xlNext, MatchCase:=False).Activate
ActiveCell.Offset(5, 1).Select
myCOL = ActiveCell.Column
myRow = ActiveCell.Row
ActiveWorkbook.Names.Add Name:="SUMdata", RefersToR1C1:= _
"=Summary!R" & myRow & "C" & myCOL & ":R" & (myRow + 14) & "C" &
(ENDmonth + 2)
Application.GoTo Reference:="QTRreport"
ActiveCell.Offset(3, 3).Select: ActiveCell.Value = CHANGEmonth
ActiveCell.Offset(0, 1).Select: ActiveCell.Value = ENDmonth
ActiveCell.Offset(2, -2).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
End If
Beep
End Sub
Sub MYTD_Summary()
Application.Run "\\arlfs03\shared\Engineering\ENG\BOM Archive\BOM
Macros.xls!MYTD_Summary"
End Sub
But I get a Run-time error '1004'
The macro '\\arlfs03\shared\Engineering\ENG\BOM Archive\BOM
Macros.xls!MYTD_Summary' cannot be found.
If I assign the macro to the object it works fine - It's an oval I drew
using the drawing tools in Excel, not a command button.
What am I missing?
This is the code from the BOM Marcos.xls File:
Sub MYTD_SUMMARY()
Range("AZ6").Select
Selection.End(xlToLeft).Select
ActiveCell.Offset(-1, 0).Select: ENDmonth = ActiveCell.Column - 2::
ActiveCell.Offset(0, 1).Select
ActiveCell.Offset(0, -1).Select: Period = ActiveCell.Value
If Left(Period, 4) = "C/O " Then
CHANGEmonth = ActiveCell.Column - 2
end if
If ActiveCell.Column = 2 Then CHANGEmonth = 0
Cells.Find(What:="DASHBOARD SNAPSHOT", After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByColumns,
SearchDirection:= _
xlNext, MatchCase:=False).Activate
ActiveCell.Offset(5, 1).Select
myCOL = ActiveCell.Column
myRow = ActiveCell.Row
ActiveWorkbook.Names.Add Name:="SUMdata", RefersToR1C1:= _
"=Summary!R" & myRow & "C" & myCOL & ":R" & (myRow + 14) & "C" &
(ENDmonth + 2)
Application.GoTo Reference:="QTRreport"
ActiveCell.Offset(3, 3).Select: ActiveCell.Value = CHANGEmonth
ActiveCell.Offset(0, 1).Select: ActiveCell.Value = ENDmonth
ActiveCell.Offset(2, -2).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
End If
Beep
End Sub