Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default progress bar problem still

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default progress bar problem still

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default progress bar problem still

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default progress bar problem still

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default progress bar problem still

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   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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Progress Bar leerem Excel Discussion (Misc queries) 2 August 13th 08 05:16 PM
Progress bar [email protected] Excel Discussion (Misc queries) 1 January 6th 07 01:49 PM
Progress bar in VBE Scott P Excel Programming 5 June 14th 04 06:27 PM
Progress Bar Squid[_3_] Excel Programming 1 February 9th 04 11:07 PM
Progress Bar Help Malcolm Excel Programming 2 November 21st 03 02:29 PM


All times are GMT +1. The time now is 09:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"