Create a reference to a workbook which is already open
I am looking to create a reference to a workbook which is already
open. I have used the code below but this throws the error '32813':
name conflicts with existing module, project or object library'. The
project that I am trying to reference has a unique name.
Sub Create_Reference()
Dim Path1 As String
Path1 = ThisWorkbook.Worksheets("Timesheet").Range("T2").T ext &
"Data File NEW.xls"
Application.VBE.ActiveVBProject.References.AddFrom File Path1
End Sub
What I am really trying to do is have the workbook that I am
referencing opened as a Read Only copy.
Any help on this would be appreciated
|