View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ryan H Ryan H is offline
external usenet poster
 
Posts: 489
Default Open Referenced Add In Workbook as Read Only

My Add-In workbook is an add in. The IsAddIn property is set to True, plus
it has the .xla extension like I mentioned in my earlier post. The problem
is this. I save it with a password to modify. So when my Quote workbook
automatically opens the Add-In (because Quote references the Add-In) a dialog
box opens asking for the password or click Read Only. I don't want the user
to see this dialog. I want the Add-In to open as Read Only automatically. I
need it to open as Read Only because I want to be able to do updates on the
Add-In without requiring all the sales department to close it down and slow
them up.

Any ideas?
--
Cheers,
Ryan


"Gary Brown" wrote:

If your clients can see the add-in when it opens, then it isn't really an
addin because it would open invisibly behind the scenes and only be available
to the ordinary client through the VBE.
I would suggest that you put something like the following in the 'Quote.xls'
workbook's ThisWorkbook Workbook_Open() module to make your add-in a true
add-in...

Private Sub Workbook_Open()
'Assuming the 'My Add-In' is in the TITLE field
' of the add-in's properties
Workbooks.Open Filename:="C:\Temp\MyAddin.xla"
AddIns("My Add-in").Installed = True
End Sub

--
Hope this helps.
If it does, please click the Yes button.
Thanks in advance for your feedback.
Gary Brown



"Ryan H" wrote:

I have a Quote workbook (.xls) that refrences code in an Add-In workbook
(.xla). Is there a way to have the Add-In workbook automatically open as
Read Only? I saved the Add-In with a password to modify and when the Add-In
is opened the user is asked to enter a password or click Read Only button.
I'd like to skip this dialog box.

By doing this I should be able to overwrite the Add-In workbook to update
"bugs" that I find, without having everyone on the sales team close the
workbooks so I can do updates.

Thanks in Advance!
--
Cheers,
Ryan