Results 1 to 10 of 10

Thread: Permission denied error 70: With XP SP3, Office 2007, Internet Explorer 8 VB6.5

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2010
    Posts
    5

    Resolved Permission denied error 70: With XP SP3, Office 2007, Internet Explorer 8 VB6.5

    Hello,

    I am looking for ideas to help me resolve an issue on my development machine.

    XP SP3, Office 2007, Internet Explorer 8, VB6.5

    Using the code posted here http://www.excelforum.com/excel-prog...-internet.html I am getting the pretty frustrating Permission denied Error 70 - but only when I set the value of q to SearchTest. (Works fine up until then)

    I have signed and trusted myself in Excel.
    I have told IE that Google is a trusted site.
    I have trusted the Macro with access to the VBA project Object Model.
    (and I have tried a few more desperate approaches).

    But all to no avail.

    Is there perhaps even a way to track where the error code is generated? Any clues would be much appreciated.


    Thank you

    GEB
    Last edited by GazEdBro; Apr 21st, 2010 at 07:38 AM. Reason: Fixed

  2. #2
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Permission denied error 70: With XP SP3, Office 2007, Internet Explorer 8 VB6.5

    Welcome to the forums

    Never just copy and paste the code and even if you do, understand what it is supposed to do....

    Can you guess and tell me what the "q" and the "btnG" is? and what is it supposed to do? I know the answer but I want you to discover it for yourself
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2010
    Posts
    5

    Re: Permission denied error 70: With XP SP3, Office 2007, Internet Explorer 8 VB6.5

    I am puzzled by the comment about not pasting code -since I provided a link instead. q and btnG are the field names from the site. I have of course tried this on other sites with the correct field names but all to no avail.

    GEB

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Permission denied error 70: With XP SP3, Office 2007, Internet Explorer 8 VB6.5

    I am puzzled by the comment about not pasting code
    he meant you should understand the code, not just blindly copy

    i have no idea why you are getting the error as i use code like that all the time, but i am using earlier version of IE and excel

    post your code so we can see what you are trying to do, and show which line you get the error
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  5. #5

    Thread Starter
    New Member
    Join Date
    Apr 2010
    Posts
    5

    Re: Permission denied error 70: With XP SP3, Office 2007, Internet Explorer 8 VB6.5

    My problem is that I thoroughly understand the code, but I can't seem to find out which bit of the system is throwing the exception - actually I would also like to know why - but at least if I knew if it was the IE control or XP etc. I could move forward. But thanks for taking an interest - it is greatly appreciated.

    'Written: October 11, 2007
    'Author: Leith Ross
    'This code first requires setting a reference to Microsoft Internet Controls.
    'In the Object Browser the properties, methods, and events appear under SHDocVw.

    Sub VisitSite()

    Dim IEapp As Object
    Dim IEdoc As Object
    Dim SearchText As String
    Dim URL As String

    URL = "http://www.google.com/"
    SearchText = "Excel help"
    Set IEapp = New InternetExplorer

    ' Launch Internet Explorer and go to the site
    With IEapp
    .Visible = True
    .Navigate URL
    End With

    ' Wait until Internet Explore finishes loading
    While IEapp.Busy
    DoEvents
    Wend

    ' Insert search text
    Set IEdoc = IEapp.Document
    IEdoc.All("q").Value = SearchText
    ' Wait till the page is loaded
    While IEapp.Busy
    DoEvents
    Wend
    ' Clicks the button named "btnG" which is google's search button
    IEdoc.All("btnG").Click
    While IEapp.Busy
    DoEvents 'wait until IE is done loading page.
    Wend

    End Sub

  6. #6
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Permission denied error 70: With XP SP3, Office 2007, Internet Explorer 8 VB6.5

    you can step through the code line by line to find where the error occurs use F8 key

    the code works without error here,
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  7. #7

    Thread Starter
    New Member
    Join Date
    Apr 2010
    Posts
    5

    Re: Permission denied error 70: With XP SP3, Office 2007, Internet Explorer 8 VB6.5

    It stops here:
    IEdoc.All("q").Value = SearchText
    Sorry I thought I'd made that clear in the original post. And yes, Internet Explorer does pop up and successfully navigate to Google.

    GEB

  8. #8
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Permission denied error 70: With XP SP3, Office 2007, Internet Explorer 8 VB6.5

    i would presume the the error is caused by internet explorer
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

  9. #9

    Thread Starter
    New Member
    Join Date
    Apr 2010
    Posts
    5

    Resolved Re: Permission denied error 70: With XP SP3, Office 2007, Internet Explorer 8 VB6.5

    I've got it.

    Looking under the Locals Window under IEapp.Document.all I see just an Object "constructor" and 2 Long types "ie8_length" and "length" each with the value <Permission denied>. So it appears that my issue was connected to the implementation of the InternetExplorer control with IE8. By re-writing the code

    to
    IEdoc.getElementById("q").Value = SearchTest
    it avoids the problem.

    My copy of Office is brand new so it could be that "all" is on its' way out - obviously I don't know that for sure but it might be worth watching out for.

    Thanks for your help

    GEB

  10. #10
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Permission denied error 70: With XP SP3, Office 2007, Internet Explorer 8 VB6.5

    thanks for posting your solution, i will keep it in mind
    i would believe it is more to do with later versions of internet explorer security, than the office version
    i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
    Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next

    dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part

    come back and mark your original post as resolved if your problem is fixed
    pete

Posting Permissions

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



Click Here to Expand Forum to Full Width