View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Warning Message (at open) if Multiple Sheets are Selected

You could add this procedure to every workbook's project that you need (in a
general module):

Option Explicit
Sub Auto_Open()
if activewindow.selectedsheets.count 1 then
msgbox "Be careful--multiple sheets selected"
end if
End Sub

If you're new to macros:

Debra Dalgleish has some notes how to implement macros he
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)

Dave wrote:

Is there a macro/code that will warn me when multiple sheets are selected
when I open a file? A lot of my files have 10+ tabs with long names so I
don't necessarily see all of the active tabs. So if I happened to save the
file with multiple tabs selected and then reopen it and start working
(without checking), I overwrite information I didn't intend to overwrite. I
have seen the msgbox activewindow.selectedsheets.count code but I don't know
where to put it in VB.

Any help is appreciated.

Thanks


--

Dave Peterson