I have 2 command buttons The first prints the complete IT plan of the
building (About 30 pages)
The second asks the user to select from a drop down list the floor & wing&
prints that 1 page.
If the user doesn't select the Floor/wing but selects that command the code
breaks down. If I put in an On error message to handle the error it then
gives the message but then goes on to print the 30 pages.
Not sure if your command buttons are on a sheet or a form, either way
it seems odd that the user would need to click a button to be asked to
select from a dropdown list.
A better way might be set your 'Print' command button's 'Enabled'
property to FALSE at design time and have the dropdown (rather than
another command button) clearly labelled 'Select Floor/Wing:' Then, in
the dropdown's change event, test the length of the dropdown's text or
value property. If it's greater than 0 then you set the Print button's
enabled property to TRUE otherwise you set it to FALSE (even though
you set it to FALSE at design time you still need to set it to FALSE
after finding a zero length string in case the user entered a value
then deleted it).
This is just a loose overview of how you might tackle the problem. If
you need more help you'll need to specify whether these command
buttons and dropdown are on a VBA Form or a sheet (or a mixture).
Br, Nick.