Is there a way to disable the "group edit" mode in Excel completely?
Or is it atleast possible to program an add-in that will prevent the
user from editing data into any cell while in "group edit" mode?
Thanks,
Sundar
Put this into the codemodule of the Thisworkbook object:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If ActiveWindow.SelectedSheets.Count > 1 Then
With Application
.EnableEvents = False
.Undo
MsgBox "Oh, please don't group the sheets..."
ActiveWindow.SelectedSheets(1).Select 'Ungroups
.EnableEvents = True
End With
End If
End Sub
--
HTH,
Bernie
MS Excel MVP
"sundarvenkata" <sundar...@gmail.com> wrote in message
news:b92c23b7-7c34-4a45...@c11g2000yqj.googlegroups.com...
Thanks for the help!
I was wondering if there is a way I could make this work for any excel
file I open instead of just the current "excel" file.
Thanks,
Sundar
You can use application events:
http://www.cpearson.com/excel/AppEvent.aspx
HTH,
Bernie
MS Excel MVP
"sundarvenkata" <sundar...@gmail.com> wrote in message
news:7fd881a0-e98e-4dae...@g38g2000yqd.googlegroups.com...
I cannot thank you enough for your help!
Thanks,
Sundar