I have used the following code snippet to select the right sheet for printing.
Sub Printout()
Dim yr as string
yr = UserForm1.LBYear.Value
SheetName = "ManagementAccounts " & yr
With Sheets(SheetName)
 .Activate
I had not realised that there were situations where the user could get to this bit of code where UserForm1.LBYear (a ListBox) did not yet have a value.
An easy way round this would be for me to put a value for yr in a cell,(Sheets("Utilities").Range("F17"), and in the error situation, which occurs when LBYear has no value, use this instead.
I have not been able to satisfactorily code this and would like some help please.
John