×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Has anyone created a "Progress Meter" in EB

Has anyone created a "Progress Meter" in EB

Has anyone created a "Progress Meter" in EB

(OP)
Hi Guys,

I have a couple of Macros that do some heavy duty number crunching in the background and also create large text files on different servers over the network. While these processes are happening there is no indication that the macro is doing anything.

Has anyone created anything, in EB, that shows the user "Running..." or better still how far thru the process is eg "Running...45%" etc.  I don't want the user to have to respond to a prompt in MsgBox or similar; And I don't want it to impact the performance too much.

Any pointers would be greatly received (and I will respond this time... Sorry SKIE!)

Jez

RE: Has anyone created a "Progress Meter" in EB

Here's one I borrowed from Mark in the VBS Forum.  The nessecary changes have been made to run via EB.

CODE

' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: http://www.thespidersparlor.com
' DATE  : 8/11/2004


Function DisplayProgress(stage)
    dim x as Object
    set x = createobject("internetexplorer.application")
    'in code, the colon acts as a line feed
    x.navigate2 "about:blank" : x.width = 350 : x.height = 80 : x.toolbar = false : x.menubar = false : x.statusbar = false : x.visible = True

    x.document.write "<font color=blue>"
    For n = 1 to 100
        x.document.write "|"
        DoEvents
        x.document.title = "Stage " & stage & " " & n & " %"
    Next
    stage = stage + 1
    'close the window
    x.quit
    set x = nothing
    DisplayProgress = stage
End Function


Sub Main

TestCondition = ""
stage = 1
Do
   If stage > 0 Then
           stage = DisplayProgress(stage)
   End If
Loop While TestCondition = ""

End Sub

thumbsup2  Wow, I'm having amnesia and deja vu at the same time.
                         I think I've forgotten this before.


RE: Has anyone created a "Progress Meter" in EB

(OP)
Thanks Mr Milson for that,

I am not at work (with no access to EB), so I can't check the variable "TestCondition" - Is this a reserved variable? (Excuse my ignorance!)  or, where does it get set to Non-""?

Will check it out in the next couple of days at work.

Jez

RE: Has anyone created a "Progress Meter" in EB

As written the example will run indefinately.  You would need to set up the conditions/values in your script to populate and terminate the progress bar.

thumbsup2  Wow, I'm having amnesia and deja vu at the same time.
                         I think I've forgotten this before.


RE: Has anyone created a "Progress Meter" in EB

(OP)
Again Thanx for your response MrMilson.

Tried your code today and it worked great.... Then was able to develop it in my "simplistic way" and it worked even greater!  Thanx for the pointers.

BTW: Where can I find a list of all the variables attached to the ("internetexplorer.application") object?  Also, I have found a raft of tips, on this site, on things like placing values straight into Excel spreadsheets, etc, etc - This is the first time that my system has actually allowed me to open another application, in this example IE.  Is this because my PC at work is "locked down" or if trying to access Excel I am using the wrong syntax?

Jez

RE: Has anyone created a "Progress Meter" in EB

Post the code your attempting to open Excel with.

thumbsup2  Wow, I'm having amnesia and deja vu at the same time.
                         I think I've forgotten this before.


RE: Has anyone created a "Progress Meter" in EB

Thanks was looking for something like for a while.  Everything is working great but how:

Can I show this progress bar to the user on the mainframe. Currently the progress run in the minimized window on the window toolbar.

How can it be display to the user something like
x.show =true or x.maximized=true

Otherwise this progress bar does miracle.

Thanks

RE: Has anyone created a "Progress Meter" in EB

x.visible = True

Sometimes you gotta leave your zone of safety. You have to manufacture Inspirado. You gotta get out of the apartment. You've got to run with the wolves. You've got to dive into the ocean and fight with the sharks. Or just treat yourself to a delicious hot fudge sundae........ with nuts. - Jack Black

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close