microsoft vba

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Microsoft VBA

Microsoft VBA

resolvedResolved · Low Priority · Version 2007

James has attended:
Excel VBA Intro Intermediate course

Microsoft VBA

I have a sheet where a branches financials are selected using a drop down box and the info is brought through from hidden tabs using a indirect formula.

I am trying to print each location without manually working through the list and printing.

I have a macro to change the location and also a macro to print, however it only prints what is shown on the screen at that time. The macro works through the changing locations much quicker than the printer is able to process the print jobs so it may end up printing every 5th location.

The only way around this i have found is to build a msgbox after each print command and it then does not print again until ok is clicked. Is there any easy way of automating a loop to not loop until after the printer has confirmed receipt of the print job?

I am guessing no, but thought it may be worth asking anyway.

Thanks,
James

RE: Microsoft VBA

Sorry I should have said that I am printing to a PDF printer.

When i print to a normal printer it works fine.

Many thanks,

James

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Use RANDBETWEEN to generate random numbers

There may be occassions where you need to generate random numbers in your spreadsheet. Use the RANDBETWEEN function to generate random numbers between two values that you specify.

The function looks like this:

=randbetween(LOW,HIGH)

where LOW is the lowest number you want generated; and HIGH is the highest number you want generated.

This formula will work with both positive and negative LOWs and HIGHs. Also it will only generate integer numbers unless forced to do otherwise by the following:

=randbetween(LOW*10^PRECISION,
HIGH*10^PRECISION)/(10^PRECISION).

where PRECISION represents the levels of decimal precision needed (i.e. if you need numbers with one decimal place, PRECISION would be 1; 2 for two decimal places and so on).

One final note, if the RANDBETWEEN formula does not work in your spreadsheet or returns a "#NAME" error, you need to install the Analysis Toolpak Add-In. You will need to press F2 then Enter following the installation.

View all Excel hints and tips


Server loaded in 0.08 secs.