Hi
I have a spreadsheet with many different tabs, i want to make it so that the user is unable to select multiple tabs at one time. I tried using the below code in the indiviual sheets code
Private Sub Worksheet_Change(ByVal Target As Range)
if activewindow.selectedsheets.count > 1 then
msgbox "Please ungroup the sheets before running this macro!
exit sub
end if
end sub
but the problem i had with this is that the change takes place before the macro kicks in and stops the user, i.i if i type "a" into cell C1 it will say a and then the message box will appear.
Can anyone help?
Thanks
I have a spreadsheet with many different tabs, i want to make it so that the user is unable to select multiple tabs at one time. I tried using the below code in the indiviual sheets code
Private Sub Worksheet_Change(ByVal Target As Range)
if activewindow.selectedsheets.count > 1 then
msgbox "Please ungroup the sheets before running this macro!
exit sub
end if
end sub
but the problem i had with this is that the change takes place before the macro kicks in and stops the user, i.i if i type "a" into cell C1 it will say a and then the message box will appear.
Can anyone help?
Thanks