Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Something I thought would be so simple has turned into a nightmare. I
need to open a workbook named index.xls Read Only and then hide 25 of the 26 worksheets. Yes, I tried to create a new workbook and paste link of the one worksheet I need, but the workbook is heavy laden with formulae, formatting, etc. so it crashes everytime I attempt to paste. So, I'm going for Plan II and it has to be dummy proof for the users. No protection; no passwords; not based on userlogin. My question is, is there a way to open UserIndex.xls with it's Workbook_Open code and somehow "call" the macro ShowMySheetOnly to run in the Read Only? The macros work perfectly separately, but I cannot figure out how to combine them so the user only has to open the one document? What I have for the two docs: UserIndex.xls opens FileIndex.xls read only: Sub Workbook_Open() Workbooks.Open Filename:="C:\medcenter\index.xls", ReadOnly:=True Workbooks("index.xls").Activate End Sub Hide all worksheets but Sheet1 in FileIndex.xls: Sub ShowMySheetOnly() Dim Wks As Worksheet For Each Wks In ThisWorkbook.Worksheets If Wks.Name < "Sheet1" Then If Wks.Visible = xlSheetVisible Then Wks.Visible = xlSheetHidden End If Next Wks End Sub Thank you to any and all who offer their insight/suggestions, etc. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Use hyperlink to open workbook read only? | Excel Discussion (Misc queries) | |||
Need VBA Code to Open a Workbook in read only | Excel Discussion (Misc queries) | |||
Running a macro in a open as read-o Workbook | Excel Programming | |||
Running a macro in a open as read-o Workbook | Excel Programming | |||
workbook open read only without prompt | Excel Programming |