+ Reply to Thread
Results 1 to 6 of 6

Open excel file from password protected Intranet site(IE)

  1. #1
    Dan McCollick
    Guest

    Open excel file from password protected Intranet site(IE)

    Hello all.
    I am currently developing some code to open an excel file from a
    password protected intranet website. When i step through my code,
    everything works fine, but when run normally my code will die at the if
    application.workbooks.count=currentnumexcel statement(i.e. the code
    executes faster then excel can open the file from ie?!).

    I thought by having the While ie.busy loop, i would avoid this problem;
    do i need to add something like while Excel is opening the file,
    wait?? What's the correct syntax for this?

    Thanks


    <Code>
    currentnumexcel = Application.Workbooks.Count
    frm.Click
    While IE.Busy
    DoEvents
    Wend

    ' if opened new excel instance then copy otherwise prompt error

    If Application.Workbooks.Count = currentnumexcel Then
    Application.Workbooks(currentnumexcel).Activate
    MsgBox URL & " could not be opened, please check your login
    information", vbExclamation
    Exit Function
    Else
    Set xlEroom = Application.Workbooks(Application.Workbooks.Count)
    End If
    'get application data
    </code>


  2. #2
    Dan McCollick
    Guest

    Re: Open excel file from password protected Intranet site(IE)

    bump


  3. #3
    Tim Williams
    Guest

    Re: Open excel file from password protected Intranet site(IE)

    If you want to bump a post then at least include your original question: not everyone is using web "forums"...

    It would also be helpful to post all of your IE-relevant code. Without seeing how you're loading the page it's less easy to
    suggest fixes.

    Automation of IE typically looks something like this:

    ie.Navigate sURL
    Do Until ie.ReadyState = 4
    DoEvents
    Loop

    Try that instead of IE.busy

    Tim.




    "Dan McCollick" <mccollick24@hotmail.com> wrote in message news:1146687396.037073.241930@u72g2000cwu.googlegroups.com...
    > bump
    >




  4. #4
    Dan McCollick
    Guest

    Re: Open excel file from password protected Intranet site(IE)

    Thanks Tim, your solution worked.

    How would i include my original question in the post? is it just a
    copy and paste?



    From: Dan McCollick - view profile
    Date: Thurs, Apr 20 2006 4:50 pm
    Email: "Dan McCollick" <mccollic...@hotmail.com>
    Groups: microsoft.public.excel.programming
    Not yet ratedRating:
    show options


    Reply | Reply to Author | Forward | Print | Individual Message | Show
    original | Remove | Report Abuse | Find messages by this author


    Hello all.
    I am currently developing some code to open an excel file from a
    password protected intranet website. When i step through my code,
    everything works fine, but when run normally my code will die at the if

    application.workbooks.count=currentnumexcel statement(i.e. the code
    executes faster then excel can open the file from ie?!).

    I thought by having the While ie.busy loop, i would avoid this problem;

    do i need to add something like while Excel is opening the file,
    wait?? What's the correct syntax for this?


    Thanks


    <Code>
    currentnumexcel = Application.Workbooks.Count
    frm.Click
    While IE.Busy
    DoEvents
    Wend


    ' if opened new excel instance then copy otherwise prompt error


    If Application.Workbooks.Count = currentnumexcel Then
    Application.Workbooks(currentnumexcel).Activate
    MsgBox URL & " could not be opened, please check your login
    information", vbExclamation
    Exit Function
    Else
    Set xlEroom = Application.Workbooks(Application.Workbooks.Count)
    End If
    'get application data
    </code>


    Reply





    From: Dan McCollick - view profile
    Date: Wed, May 3 2006 4:16 pm
    Email: "Dan McCollick" <mccollic...@hotmail.com>
    Groups: microsoft.public.excel.programming
    Not yet ratedRating:
    show options


    Reply | Reply to Author | Forward | Print | Individual Message | Show
    original | Remove | Report Abuse | Find messages by this author


    bump

    Reply





    From: Tim Williams - view profile
    Date: Thurs, May 4 2006 12:30 am
    Email: "Tim Williams" <timjwilliams at gmail dot com>
    Groups: microsoft.public.excel.programming
    Not yet ratedRating:
    show options


    Reply | Reply to Author | Forward | Print | Individual Message | Show
    original | Report Abuse | Find messages by this author


    If you want to bump a post then at least include your original
    question: not everyone is using web "forums"...

    It would also be helpful to post all of your IE-relevant code. Without
    seeing how you're loading the page it's less easy to
    suggest fixes.


    Automation of IE typically looks something like this:


    ie.Navigate sURL
    Do Until ie.ReadyState = 4
    DoEvents
    Loop


    Try that instead of IE.busy


    Tim.


  5. #5
    Tim Williams
    Guest

    Re: Open excel file from password protected Intranet site(IE)

    If using Google groups there's an option to reply under the "show options" link in the message header. This one includes the
    original text (trim as appropriate) in your reply.

    If using a newreader then set the appropriate option (depends on what you're using)

    --
    Tim Williams
    Palo Alto, CA


    "Dan McCollick" <mccollick24@hotmail.com> wrote in message news:1147454181.148193.232900@i39g2000cwa.googlegroups.com...
    > Thanks Tim, your solution worked.
    >
    > How would i include my original question in the post? is it just a
    > copy and paste?
    >
    >
    >




  6. #6
    Dan McCollick
    Guest

    Re: Open excel file from password protected Intranet site(IE)

    Thanks, noted.


+ 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