How to enable macro for another workbook

  • Thread starter Thread starter Andy
  • Start date Start date
A

Andy

Hi,

If I opened 1st workbook "book A" with macro disabled, then I opened
workbook "book B" with macro enabled. What's the code needed on "book B" to
enable macro in "book A"

Thanks and Happy New Year to all
Andy
 
one way:

Dim sFileName As String
With Workbooks("book A.xls")
sFileName = .FullName
.Close
End With
Workbooks.Open Filename:=sFileName
 
Thanks !

J.E. McGimpsey said:
one way:

Dim sFileName As String
With Workbooks("book A.xls")
sFileName = .FullName
.Close
End With
Workbooks.Open Filename:=sFileName
 
Back
Top