udigold1
01-15-2009, 07:43 AM
Hi,
I'm trying to run a macro from another workbook, but I'm having problems,
I get "run time error 1004, cannot run the macro..."
The code which I use:
'****** Variables for Origin File ******
Dim ph As Range
Dim fl As Range
Set fl = Range("filepitzul")
Set ph = Range("pathpitzul")
'****** End Variables ******
Workbooks.Open ph & "\" & fl
'****** Variables for Target File ******
Dim trBook As Workbook
Set trBook = Workbooks(fl.Value)
'****** End Variables ******
Application.Run (trBook.Name & "!PitzulMethod")
The security settings are set to mininum and the macro does exist...
Can anyone help, please?
Thanks
I'm trying to run a macro from another workbook, but I'm having problems,
I get "run time error 1004, cannot run the macro..."
The code which I use:
'****** Variables for Origin File ******
Dim ph As Range
Dim fl As Range
Set fl = Range("filepitzul")
Set ph = Range("pathpitzul")
'****** End Variables ******
Workbooks.Open ph & "\" & fl
'****** Variables for Target File ******
Dim trBook As Workbook
Set trBook = Workbooks(fl.Value)
'****** End Variables ******
Application.Run (trBook.Name & "!PitzulMethod")
The security settings are set to mininum and the macro does exist...
Can anyone help, please?
Thanks