Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Status Bar Text at the application level 1

Status
Not open for further replies.

mike777

Programmer
Jun 3, 2000
387
US
Hello.
Suppose you have a procedure that loops around say, 1000 times. You want to update the user as to the progress of the procedure via the Status Bar. Is there a way to update the status bar via VBA code, like at the end of a loop in a procedure.
Thank you.
-Mike Kemp
 
Hi!

You should be able do that using the SysCmd method, try running something like this (put in some breakpoints/msgboxes... to see what's happening;-)):

[tt]dim varReturn as variant
dim strMsg as string
conMax=1000
dim lngCounter as long
strMsg = "Updating something"
varReturn=syscmd(acSysCmdSetStatus, strMsg)
varReturn=syscmd(acSysCmdInitMeter, strMsg, conMax)
for lcounter=1 to conMax
varReturn=syscmd(acSysCmdUpdateMeter, lcounter)
next lcounter
varReturn=syscmd(acSysCmdClearStatus)[/tt]

- typed not tested...

Roy-Vidar
 
Roy-Vidar,
Many thanks.
Works perfectly.
-Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top