How to run macro from another file

P

Piotr

Hi,
is it possible to have vba code in workbook ehich would do:

Workbooks.Open Filename:="D:\somefile.xls"
'and then
run Sub one - this I have no clue how to make ?
run Sub two
run Sub three
and
ActiveWorkbook.Close
 
D

Dave Peterson

Application.Run "'somefile.xls'!SubOne"
Hi,
is it possible to have vba code in workbook ehich would do:

Workbooks.Open Filename:="D:\somefile.xls"
'and then
run Sub one - this I have no clue how to make ?
run Sub two
run Sub three
and
ActiveWorkbook.Close
 
Top