Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Nov 18, 9:08*am, slim26 wrote:
On Nov 18, 6:09*am, Joel wrote: Why would you want a workbook when it opens, open a workbook that is already opened? This macro makes no sense!!! "slim26" wrote: 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 . Purpose of the macro is to force the file into readonly mode upon opening. *But I believe I see the error now. *Thanks. I was using the wrong method to attempt to force file to open as readonly. All I simply needed was this: Private Sub Workbook_open() ThisWorkbook.ChangeFileAccess Mode:=xlReadOnly End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Ghost in my VLOOKUP | Excel Discussion (Misc queries) | |||
Hypelink and Paste | Excel Worksheet Functions | |||
I seem to have a ghost macro. | Excel Discussion (Misc queries) | |||
PIVOT TABLE + HYPELINK: Mission Impossible ? | Links and Linking in Excel | |||
How to become a better programmer, post college. More projects or less projects. | Excel Programming |