LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I set up a workbook to open on a cell reference every time CAHM Excel Discussion (Misc queries) 2 November 30th 07 05:41 PM
Activating an Open Workbook without using the whole filename as a reference jlejehan Excel Programming 3 May 2nd 06 07:58 AM
Circular reference in an open workbook Joe Cletcher Excel Programming 2 March 3rd 06 12:49 PM
Create and open a workbook in VB.net ? Kjeldc Excel Discussion (Misc queries) 2 December 3rd 05 02:17 PM
Open an existing workbook and reference it TimT Excel Programming 1 October 12th 05 05:11 PM


All times are GMT +1. The time now is 10:25 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"