Results 1 to 19 of 19

Asks for password for protected VBA code when closing Excel

Threaded View

  1. #1
    Registered User
    Join Date
    09-13-2010
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    88

    Exclamation Asks for password for protected VBA code when closing Excel

    Hi, there
    I have a spreadsheet with a piece of VBA code built in at "ThisWorkbook" as below:
    Private Sub Workbook_Open()
    intbutton = MsgBox("If you wish do A Press 'Yes'. To Do B 
     press 'No'", vbYesNo, "Something")
    
    If intbutton = vbYes Then
    'Do A
    End If
    
    End Sub
    Additionally, there are some forms with built in VBA codes. All the VBA codes are protected with the same password. Here is the problem, after close this speadsheet, if it is attempted to close Excel after it, a message comes out and asks for password for the VBA code. A several methods were tried to get rid of this problem. It seems it only works if do the following step

    Close the spreadsheet
    Open Microsoft Visual basic editor
    Highlight the VBA project of the speadsheet
    Close Microsoft Visual basic editor
    Close Excel.

    Does anybody have even met this problem before? How can I solve it without going through the step listed above?

    Thanks in advance. Your time and effort will be highly appreciate.

    Best regards,
    Chunli
    Last edited by romperstomper; 09-13-2010 at 09:23 AM. Reason: add code tags.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1