Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Johnny,
Try this. Build a little userform that says that the doc is loading In the form Userform_Activate, add the following code Private Sub UserForm_Activate() Application.OnTime Now + TimeValue("00:00:01"), "loadit" End Sub where loadit is the name of another macro that opens the Word doc. Also in that macro, add the line Unload Userform1 at then end. Not too much visual feedback, but something. -- HTH Bob Phillips 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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks bob, although the userform will still only appear for 1 sec, it
disapears after that and i am still waiting for the doc to load regards johny Bob Phillips wrote: Johnny, Try this. Build a little userform that says that the doc is loading In the form Userform_Activate, add the following code Private Sub UserForm_Activate() Application.OnTime Now + TimeValue("00:00:01"), "loadit" End Sub where loadit is the name of another macro that opens the Word doc. Also in that macro, add the line Unload Userform1 at then end. Not too much visual feedback, but something. -- HTH Bob Phillips 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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It shouldn't do. The code in the 'loadit' macro should look something like
Public Sub loadit() 'the code to open the word document Unload Userform1 End Sub What does yours look like? -- HTH RP (remove nothere from the email address if mailing direct) wrote in message oups.com... thanks bob, although the userform will still only appear for 1 sec, it disapears after that and i am still waiting for the doc to load regards johny Bob Phillips wrote: Johnny, Try this. Build a little userform that says that the doc is loading In the form Userform_Activate, add the following code Private Sub UserForm_Activate() Application.OnTime Now + TimeValue("00:00:01"), "loadit" End Sub where loadit is the name of another macro that opens the Word doc. Also in that macro, add the line Unload Userform1 at then end. Not too much visual feedback, but something. -- HTH Bob Phillips 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 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Progress Bar | Excel Discussion (Misc queries) | |||
Progress bar | Excel Discussion (Misc queries) | |||
Progress bar in VBE | Excel Programming | |||
Progress Bar | Excel Programming | |||
Progress Bar Help | Excel Programming |