View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dan McCollick Dan McCollick is offline
external usenet poster
 
Posts: 10
Default 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"
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"
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.