+ Reply to Thread
Results 1 to 14 of 14

Wrong line of code banned me out and can't access vba code...

  1. #1
    Registered User
    Join Date
    11-07-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    25

    Angry Wrong line of code banned me out and can't access vba code...

    Hello everybody.

    I am not a very happy person at the moment.

    I was playing with hide worksheet events so that I got my user login form popup and then after submiting correct credentials form would close and workbook would appear.

    I don't know what line of code I changed or how but the impact is serious.

    I belive that the workbook is not being opened as username and password can not be verified, comes up with incorrect username and passord.

    The password is admin and password is wmex612.

    Here's a copy of the file.

    Any help will greatly improve my mood as at the moment I just want to kill myself.

    Cheers,
    Albert
    Attached Files Attached Files
    Last edited by albertc; 05-14-2012 at 11:13 AM. Reason: bad thread name... sorry

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: 3 Weeks of googling and help from forums gone...

    If you don't enable the macros when you open the workbook, you can access the VBA Project ... so you can look at the current code.

    And, if you select the View tab on the ribbon, you can unhide the workbook, so you can look at what you have in the sheets.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: 3 Weeks of googling and help from forums gone...

    hi,
    are you sure that is the username and the password? it looks like you wanna bypass the password...
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  4. #4
    Registered User
    Join Date
    11-07-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: 3 Weeks of googling and help from forums gone...

    It is not asking to enable macros mate...

  5. #5
    Registered User
    Join Date
    11-07-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: 3 Weeks of googling and help from forums gone...

    Yes mate. That is the correct username and password.

    There is another username as follows,

    arrudac
    wmex612

  6. #6
    Registered User
    Join Date
    11-07-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: 3 Weeks of googling and help from forums gone...

    This the file version I started working this morning.

    It has changed a bit from that.

    User names are not working on this one.

    I can't believe that this has happened.

    I am completely lifeless...
    Attached Files Attached Files

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: 3 Weeks of googling and help from forums gone...

    Do the following in the immediate window so you can at least get at your code and try and fix what ever you did.

    Please Login or Register  to view this content.
    Include path in the open statement.

    You might want to take out the Application.Quit command and instead simple close the workbook.
    Cheers
    Andy
    www.andypope.info

  8. #8
    Registered User
    Join Date
    11-07-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: 3 Weeks of googling and help from forums gone...

    I have tried that but nothing happened mate... I can't get to my VBA code...

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Wrong line of code banned me out and can't access vba code...

    If it is not asking for macros to be enabled, Im guessing the file is in a trusted folder ... in which case, move it somewhere else. Or you're security setting is set to low ... in which case, move it up a notch or two so that you reject it.

    Failing that, I could open the file and code so I can disable it and post it back.

    Regards, TMS

  10. #10
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Wrong line of code banned me out and can't access vba code...

    tried holding down the shift key while opening the file?
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  11. #11
    Registered User
    Join Date
    11-07-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Wrong line of code banned me out and can't access vba code...

    That did worked first time and I could some changes but still when opened again asked for user/password and could not validate them. The file could not be seen either so my guess is user/password cannot be verified cause file is not opened. But this is my guess...

    TMSucks if you could do that please I would be very much appreciated... I have even disabled macros from running but to no avail.

    Cheers everybody...

  12. #12
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Wrong line of code banned me out and can't access vba code...

    See attached files.

    I have changed the Workbook_Open to xWorkbook_Open so that it doesn't load the form.

    You should now be able to see the code in both versions.

    Regards, TMS

  13. #13
    Registered User
    Join Date
    11-07-2010
    Location
    England
    MS-Off Ver
    Excel 2003
    Posts
    25

    Re: Wrong line of code banned me out and can't access vba code...

    Thanks mate.

    I would very much like to know how you did though.

    I'l have to go through the code and see if I can find the error that caused all of this.

    One thing is for sure, keep saving versions of file with even the minor changes.

    Cheers mate.
    Albert

  14. #14
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Wrong line of code banned me out and can't access vba code...

    this line
    Please Login or Register  to view this content.
    is looking at column B for the password but you are matching the username against column F.

+ 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