+ Reply to Thread
Results 1 to 1 of 1

User Form with Text Boxes not operating correctly with linked vlookup table and VBA module

  1. #1
    Registered User
    Join Date
    01-08-2013
    Location
    Fargo, North Dakota
    MS-Off Ver
    Excel 2010
    Posts
    1

    User Form with Text Boxes not operating correctly with linked vlookup table and VBA module

    Hello Forum,

    I should begin by informing you all that I have implemented a method which tackles the so-called 'Force Enabling of Macros' dilema. A post thread on this site provided a solution whereby a generic sheet is the only visible sheet upon opening the workbook with a text message stating that the 'Enable Content' button must be selected to view the workbook's main content. Once the user clicks the 'Enable Content', a macro hides the prompt sheet and unhides the main content sheet. A new issue is that it has become neccessary to only allow access to a predetermined group who will be given unique usernames and passwords.
    I have created a user form that is opened with the 'On Open Workbook' event. It has two text boxes, one for username entry and the second for password entry. These user entries are delivered to two cells in a veryhidden spreadsheet which includes a column containing usernames and a column containing corresponding user passwords. This sheet is set up so that these columns are used in connection with the cells referencing the user entry inputs. The two vlookup cells in the sheet are nested within an iferror formula which will return the value of the match, be it username or password, if there is a correct match, or the value, 'No Match', if vlookup returns an error. Ultimately, a third 'IF' formula cell checks whether both of the vlookup cells matched; if both matched then the formula returns the value, 'Yes' and if both didn't match, the formula returns the value, 'No'.
    The issue arises when this third 'Yes/No' formula cell is used as the determining value for a VBA module which is pivotal in allowing access to the main workbook content sheet.

    Please Login or Register  to view this content.
    The code does not cause an error, but does not perform reliably, i.e. it will sometimes allow an incorrect username and password into the main content, and sometimes deny access to a correct username and password?

    Any help/alternatives will be greatly apprecaited,

    Thanks
    Last edited by psfisk6320; 01-09-2013 at 10:11 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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