Add-in Asking to be Saved

  • Thread starter Thread starter ExcelMonkey
  • Start date Start date
E

ExcelMonkey

I created an Addin. I have distributed to several work
collegues to have them test it. They have dowloaded it
into their My Documents folder and then installed it into
Excel via Toool\Addin\Browse\My Documents\Addin file.

I password protected the xla file. However whenever we
close Excel we get prompted if we want to save the changes
to the XLA file. This is confusing as its password
protected. I do not want to five anyone acccess to it.
Yet when I go to the VB Editor and click on the xla it
prompts me for a password.

Furthermore, my one colleague was showing me that although
it was clicked off in the Addin list, it was not appearing
as it should in her Menu items. So we clicked it off and
then on again and the mene item appeared.

Does anyone know what is going on here?

Thanks
 
Does your code make changes to the addin?

If so, that could be the problem on the prompt to save.
 
Sorry. I found what the problem was. I had put this code
into it when it was just an xls file. I guess I do not
need it now that it is an xla file. See below:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim Msg As String
Dim Ans As String

If Not Me.Saved Then
Msg = "Do you want to save the changes you made to "
Msg = Msg & Me.Name & "?"
Ans = MsgBox(Msg, vbQuestion + vbYesNoCancel)
Select Case Ans
Case vbYes
Me.Save
Case vbNo
Me.Saved = True
Case vbCancel
Cancel = True
Exit Sub
End Select
End If
Call DeleteMenu

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top