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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top