View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
slim26 slim26 is offline
external usenet poster
 
Posts: 3
Default Ghost VBA Projects Created when using Hypelink

Hello,

I'm am having a difficult time with the following task.

I have 2 excel workbooks.

Book 1 has a hyperlink to open Book 2

Book 2 has the Workbook_Open macro below to force the file into Read-
Only mode.

The issue I'm having is whenever I launch Book 2 from the standard
hyperlink, I am getting multiple ghost projects of Book 2 opening up.
It will then screw up my entire Excel session from that point forward.

Any suggestions?

Thanks in advance.




Sub Workbook_open()

Application.ScreenUpdating = False

Dim strName, strPath, strCurrName As String

strName = ActiveWorkbook.Name
strPath = ActiveWorkbook.Path
strCurrName = strPath & "\" & strName

Workbooks.Open strCurrName, ReadOnly:=True

Application.ScreenUpdating = True

End Sub