1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Solved: Vba code to enter password

Discussion in 'Business Applications' started by Teacherless, Jul 30, 2012.

Thread Status:
Not open for further replies.
Advertisement
  1. DataBase

    DataBase

    Joined:
    Jan 15, 2004
    Messages:
    456
    Also check if you have all these references checked. see attached.
     

    Attached Files:

    • p2.jpg
      p2.jpg
      File size:
      82.8 KB
      Views:
      71
  2. Teacherless

    Teacherless Thread Starter

    Joined:
    Jun 28, 2012
    Messages:
    94
    Hi, yes, I have just checked, and they are all ticked, as you can see by my last screen shots. The only difference is that yours has a Microsoft Office 14 Object Library and mine an Office 12. Shouldn't make a difference though. The "Trust Access Box " is ticked, as I work a lot with macros and I had to tick it a long time ago. I am starting to feel guilty now because this problem is taking up a lot of your time and we haven't fixed it yet. But still, it's a learning curve for us all.
    Cheers John.
     
  3. DataBase

    DataBase

    Joined:
    Jan 15, 2004
    Messages:
    456
    Dont worry about it mate as you said its all learning for all of us. Did you check if you had that file in c:\program files ...... In the reply i sent earlier?
     
  4. Teacherless

    Teacherless Thread Starter

    Joined:
    Jun 28, 2012
    Messages:
    94
    Yes, just checked, all there. (See Att)
     

    Attached Files:

  5. Teacherless

    Teacherless Thread Starter

    Joined:
    Jun 28, 2012
    Messages:
    94
    Hi again, just wondered about our time zone differences, I'm in South Africa and the time here is 15.36hrs. What are your "Specs"?
     
  6. DataBase

    DataBase

    Joined:
    Jan 15, 2004
    Messages:
    456
    Hi,

    im in the UK, London, time here is 16:43...

    There are 3 things i am going to suggest, try these in this order one of them should hopefully work.

    1) manually select the Vbe6ext.olb file from the VBE console. see the attached picture. from the VB editior under tools > references click browse and go to where the file is, then select it. once you have done that, you will have to find it within the list and tick it.

    2) try to register the file. All library files need to be registered, sometime something wrong and the files are not registered. to register the file to the following.

    click Start > type Run > press enter

    now type the following

    regsrv C:\Program Files\Common Files\microsoft shared\VBA\VBA6\Vbe6ext.olb

    make sure that path is correct to where the file is on your machine.....

    3) try to download the Visual Basic runtime

    http://www.microsoft.com/en-us/download/details.aspx?id=24417
     

    Attached Files:

  7. Teacherless

    Teacherless Thread Starter

    Joined:
    Jun 28, 2012
    Messages:
    94
    Mornin DataBase, I'm trying your suggestions out with a fresh mind after a good nights sleep. Ok, suggestion No1. I did this, everything seems normal there. Suggestion 2, I typed in the run box the address you gave but I think that there must be a slight mistake here as I got the message back(see att) that the address could be wrong. The path is correct, just the "regsrv" bit may not be correct. I have a feeling that once this operation is carried out successfully, things will improve. (y)
    Cheers, John
     

    Attached Files:

  8. DataBase

    DataBase

    Joined:
    Jan 15, 2004
    Messages:
    456
    Morning mate,

    Ahh yes iv made an error in that, sorry must have been half asleep. Try regsvr32
     
  9. Teacherless

    Teacherless Thread Starter

    Joined:
    Jun 28, 2012
    Messages:
    94
    Hi, I copied the address into Wordpad, edited it, then copied and pasted it into the run box. Another message appears now. See att.
     

    Attached Files:

  10. DataBase

    DataBase

    Joined:
    Jan 15, 2004
    Messages:
    456
    Hi Teacherless,

    Try this. Open windows explorer then go to the file vbe6ext.olb.

    now open another instance of windows explorer and navigate to where regsvr32.exe is located (do a search)

    now drag the vbe6ext.olb file over regsvr32.exe

    i am hoping this will allow you to register it..


    one question, within your workbook, in the VBE window, did you try to browse for the vbe6ext.olb file like i mentioned in my previous reply? and if you did what happen? that should have worked...... once you have browsed for it and added it, you will need to go and tick the checkbox next to the entry

    "microsoft visual basic extensibility 5.3"

    did you do that?
     
  11. Teacherless

    Teacherless Thread Starter

    Joined:
    Jun 28, 2012
    Messages:
    94
    Hi DataBase, thanks for getting back to me. I found the vbe6ext.olb file and the regsvr32.exe file ok and dragged like you said. Then I got the attached message. I think Bill Gates has put a curse on all SA imports of Windows7.
    Cheers, John
     

    Attached Files:

  12. DataBase

    DataBase

    Joined:
    Jan 15, 2004
    Messages:
    456
    ok will need to look into that, not sure what is causing that. May need a different way to register it.

    however, what about browsing for it like i have said before, what happen?
     
  13. Teacherless

    Teacherless Thread Starter

    Joined:
    Jun 28, 2012
    Messages:
    94
    Ok, I whent into the vba console, browsed, found and selected the Vbe6ext.olb file, then ticked the Microsoft Visual Basic for Applications Extensibility 5.3 box, which was not ticked. I then opened the workbook that you sent, opened the vba editor and tried to run the 3 macros there but got the same message each time. See att.
    Cheers, and thanks for your persistence, John
     

    Attached Files:

  14. DataBase

    DataBase

    Joined:
    Jan 15, 2004
    Messages:
    456
  15. Teacherless

    Teacherless Thread Starter

    Joined:
    Jun 28, 2012
    Messages:
    94
    Hi DataBase, quite an interesting article, however, they were referencing Windows Xp and I am using Windows 7, don't know if that makes any difference or not. I checked through the references twice very carefully but didn't find any that where missing. I think that you can enter this problem in the Olympic Games while it's in the UK, you'd get a gold, I'm sure.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1063198