Disabling "group edit" mode in Excel

S

sundarvenkata

Hi All,

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
 
B

Bernie Deitrick

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
 
S

sundarvenkata

Hi Bernie,

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top