lintz
Jun 6th, 2003, 06:18 PM
My project is linked to a spreadsheet where a lot of calulations are done and a final result is then displayed in 1 of my forms. As the calculations can take some time (30 secs to 1 min) I want to add a progressbar so the user doesn't go mad waiting for the result to be displayed.
This is the code that does the calculations........so basically I need the min to start at 0 and progress until the "Do While" has finished. I have checked out some examples on progressbars but they all seem to be for DB's or timers. I haven't been able to find an exaple for VBA. Can anyone help me out??
Do While MaxDD < Val(txtMaxDrawDown.Text)
Range("BC30").Select
ActiveCell.FormulaR1C1 = Risk
Worksheets("LBOP-New Capital p.a").Calculate
Range("BC25").Select
MaxDD = Range("BC25")
Risk = Risk - 0.00002
Loop
This is the code that does the calculations........so basically I need the min to start at 0 and progress until the "Do While" has finished. I have checked out some examples on progressbars but they all seem to be for DB's or timers. I haven't been able to find an exaple for VBA. Can anyone help me out??
Do While MaxDD < Val(txtMaxDrawDown.Text)
Range("BC30").Select
ActiveCell.FormulaR1C1 = Risk
Worksheets("LBOP-New Capital p.a").Calculate
Range("BC25").Select
MaxDD = Range("BC25")
Risk = Risk - 0.00002
Loop