View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default progress bar problem still

Tom: I haven't tried this exactly, although I remember doing something
similar. I'd be interested in your comments and experience.

John: Since you're opening the document through VBA, you've set an object
to the doc. You might try setting another object to the doc's first
paragraph. This will fail (I think!) until the doc is opened. Using On
Error and Is Nothing, you can construct a loop to set the object until it is
successful; when it is, Unload the UserForm.

Something like:

On Error Resume Next
Do
Set oPar = oDoc.Paragraphs(1)
Loop While oPar Is Nothing ' not sure of correct syntax here

Unload UserForm1
On Error GoTo 0

Ed

"Tom Ogilvy" wrote in message
...
Hyperlinks operate asynchronously to the best of my knowledge. If you

want
that kind of feedback, you need to use automation. Even then, opening a
document is a single command, so you can't get inside that command and
operate a progress bar for the time it takes to open - at least not with

any
built in capabilities of VBA that I am aware of.


Microsoft Office 2000 Automation Help File Available (Q260410)
http://support.microsoft.com/default...b;EN-US;260410

Microsoft Office XP Automation Help File Available (Q302460)
http://support.microsoft.com/default...b;EN-US;302460

--
Regards,
Tom Ogilvy


wrote in message
oups.com...
Hi,

I have some code that executes a hyperlink to open a word document on a
server. The code executes in secs, however thedoc takes a long time to
open. I have all the latest info on progress bars but this is not
working for me. i need to display a message until the word doc opens, i
can display a message based on time i.e display the mssage for 5 secs,
but the document take a variable lenght of time to open, so i need the
program to select the hyperlink display a message until the document is
open and then disapear. hel;p please if this is possible.
regards

Johny5