hello
I try finding way to run the macro from another file whether closed or opened.
my requierments are if the file is closed which contain the macro then open and run the macro to another file and closed after run the macro .
this is what I have but it gives error 1004 file could not be found .
I'm sure about the file name and the macro name . two files are found in the same folder .
Ask QuestionPrivate Sub myMacro()
Dim wb As Workbook
On Error Resume Next
Set wb = Workbooks("boo1.xlsm")
On Error GoTo 0
If wb Is Nothing Then Set wb = Workbooks.Open(ThisWorkbook.Path & "\move.xlsm")
Run "move.xlsm!test"
wb.Close False
Set wb = Nothing
End Sub
thanks