Yuppers.

 

I use a progress bar that shows what record (of total) that the script
is currently processing.

 

I use the following in my rules-based script:

 

  D.Open_ FileStamp, ftExcel, FileStamp & ".bds"

  ProgressBar ("OPEN")

 

  D.Next_

  ProgressBar ("UPDATE")

 

  D.Close_

  ProgressBar ("CLOSE")

 

Here is my ProgressBar function:

Public Function ProgressBar(PBCommand As String)

    ' This function is for opening and updating a progress bar for your
script in the

    ' upper left corner of the desktop. This function should be called
with the following

    ' immediately following a D.Open of your database:

    '   ProgressBar ("OPEN")

    ' This function should be called with the following any time the
current record changes

    '   ProgressBar ("UPDATE")

    ' This function should be called with the following any time the
database closes

    '   ProgressBar ("CLOSE")

    ' This function can also be called with the following to display a
"Done!" status

    '   ProgressBar ("DONE")

    ' Any other parameter will cause the function to not do anything

    If PBCommand = "OPEN" Then

        ScriptProgress.Show False

    ElseIf PBCommand = "UPDATE" Then

        If D.EOF Then

            ScriptProgress.lblStatus.Caption = "Done!"

        Else

            ScriptProgress.ProgressBar1.Value = D.Record

            ScriptProgress.lblStatus.Caption = D.Record & " <-- Current
Record"

        End If

    ElseIf PBCommand = "CLOSE" Then

        ScriptProgress.Hide

    End If

End Function

 

The ScriptProgress form files are attached.

 

There is a caveat: If the database has no records, your script will
error out on an invalid value error of some kind in the code of the
ScriptProgress form. I've not had time to chase it down and squash that
bug. Has to do with Min value or Max value or some such. Feel free to do
that work for me. Haha. Otherwise, don't use empty data files.

 

This is for use with excel files. I've not used it with any other types.

 

 

Thank you,

Mitch Lawrence

Lead Applications Analyst

Technical Support - NPR/Automation

CHRISTUS Information Management

*: [email protected]
<mailto:[email protected]> 

 

 

________________________________

From: [email protected] [mailto:[email protected]] 
Sent: Thursday, August 20, 2009 11:30 AM
To: [email protected]
Subject: [talkbws] Progress Screen.

 


Hello All. 
Is there a way to show a "Progress Screen" in BWS/VBA? . I have a Modal
form initially to collect info from user, and then I hide the form, but
we needed to show something to the end user about the progress of the
script. Like the number of records it processed so far, Start time,
current processing stage ect...Primarlily we are scripting into
Meditech. 

Any suggestion are very thankful. 

thanks all in advance. 

Ranjit M Bendapudi
Meditech Service Center
CSC

5209 Linbar Dr., Nashville, TN 37211
P: +1-615.662-7775 |direct: +1- 615.493.9070 |[email protected] |
www.csc.com

This is a PRIVATE message. If you are not the intended recipient, please
delete without copying and kindly advise us by e-mail of the mistake in
delivery. 
NOTE: Regardless of content, this e-mail shall not operate to bind CSC
to any order or other contract unless pursuant to explicit written
agreement or government initiative expressly permitting the use of
e-mail for such purpose. --- To post a message to this list, send mail
to: [email protected] You are currently subscribed as:
[email protected] Unsubscribe in the customer center
on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk
.aspx 

<<image001.jpg>>

Attachment: ScriptProgress.frm
Description: ScriptProgress.frm

Attachment: ScriptProgress.frx
Description: ScriptProgress.frx

---
To post a message to this list, send mail to: [email protected]

You are currently subscribed as: [email protected]

Unsubscribe in the customer center on our website: 
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx 

Reply via email to