BASIC|Calc: Progress bar

From this demo code, how can I apply the actions as hereunder to work with this progress bar ?

[Data range : From Calc row 6 to 999]
[Start progress bar dialog]
[For 6 To 999]
[Connect database]
[Retrieve data from cells of a Calc row]
[Insert data as above into database]
[Disconnect database]
[Progress bar increases its status]
[Next]
[Progress bar completes and closes ]

And is it possible to pass the variable of min and max value to

Sub ProgressBarDemo(MinStart, MaxEnd) ?

Hello,

Using the sample code works as is and it is only a matter of placing your code in the proper spot and how you want the progress bar to increment.

Sample is attached. Code is nearly identical to your link. Added InputBox (see → InputBox Function [Runtime] to allow for variables. You can also pass in a variety of other methods. In addition to the progress bar, Cell A10 will show the progress value and when finished display “Done”.

Sample — DialogWithProgressBar.ods

Note;

You should be able to change:

Const ProgressStep = 4

to:

Const ProgressStep = 1

in order to use ProgressValue to access your rows.

Edit: Also note, did not put in any checking for values entered. First input should be less than second input.

Dear @Ratslinger ,

Thank you so much for all your help.