How do you use a progress bar for functions that take a while to do there thing, i.e. one that goes throught multiple recordsets, extracting data, etc, etc?

I understand how to use a ProgessBar in Loops but not generally in something like the above.