Warning : Multiple sheets selected


Posted by Chris D on January 22, 2002 12:52 PM

Hi all,

it's about time I tried my VBA knowledge at something useful.....

is it possible to create a warning that will pop up when I try to do anything except print while I have multiple sheets selected ?

I'm not after the code yet, I just need to know if it's possible and I'll have a go at it

(I have a template workbook which I edit then print with all sheets selected. After printing, I edit it all again with somethign different and so on and so on, all day - but like an idiot I often forget to de-select all sheets and end up undoing half an hour's work which has been applied to all sheets)

is it possible, in theory, easily, for a VBA beginner ?

many thanks
Chris
:-)

Posted by Gary Bailey on January 22, 2002 1:24 PM

Want you want should be possible. As you want to do it yourself, some pointers:

Use the SelectedSheets property - but remember its a property of a Window, not of a workbook.
You probably want to use the SheetChange event in the ThisWorkbook code module.

Good luck.

Gary



Posted by Chris D on January 22, 2002 1:51 PM

Thanks Gary, I'll give it a whirl

(hey, I assume you're not the ex-Man Utd keeper of the 70's are you ?)