View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
cgr[_2_] cgr[_2_] is offline
external usenet poster
 
Posts: 6
Default Add-In password is requested when closing Excel

If I execute the following VBA Add-In Userform1 and Module1 code a number of
times and then exit Excel, I will be prompted to provide a password.

I'm running Excel 2000 and Windows XP SP2.



'---------- Form Code (UserForm1) ----------

Option Explicit


Private Sub cmdCancel_Click()

Me.Hide

End Sub

Private Sub cmdOK_Click()

Me.Hide

End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)

If CloseMode = vbFormCode Then Exit Sub

Cancel = True
Me.Hide

End Sub


'---------- Code Module ((Module1) ----------

Option Explicit



Public Sub OpenClose()

Load UserForm1

UserForm1.Show

Unload UserForm1

Set UserForm1 = Nothing

End Sub