Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read only and hide

Status
Not open for further replies.

coreydunn

Technical User
Jun 19, 2006
1
US
I am creating a macro for excel in VB and it isnt working correctly. When workbook A is opened it needs to open workbook B as read only and then hide it... it is used to hold the macros for all users.

Here is what I have:

--------------------------
Sub OpenNoShowReadOnly()
Workbooks.Open "J:\Collections\High Usage\HUT WorkFolder\RawData\Macro.xls" = ReadOnly
Windows("Macro.xls").Visible = False
End Sub
---------------------------

 
Perhaps this ?
Workbooks.Open "J:\Collections\High Usage\HUT WorkFolder\RawData\Macro.xls" ReadOnly:=True

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Use the code below in File A. This will automatically open file B and hide it when File A is opened.


Sub Auto_open()
Workbooks.Open "J:\Collections\High Usage\HUT WorkFolder\RawData\Macro.xls" = ReadOnly
Windows("Macro.xls").Visible = False




End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top