Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent users from Merging Cells in Excel

Status
Not open for further replies.

apkohn

Technical User
Nov 27, 2000
62
AU
I have a spreadsheet in Excel, that I would like to prevent users from being able to merge cells.

Protecting the sheet is not an option, as users must be able to set the colours of cells.

I wanted to try to detect, through VBA, any Merging of cells and then undo the action, however, it appears that any of the OnEvents of a worksheet, do not trigger on merging cells (OnChange triggers on de-merging, but not on merging).

Is there something that I am missing?
 
Nope - you're in a bit of a sticky situation - the merge doesn't trigger the change event and demerge won't either unless there is text in one of the merged cells
If there is only 1 column of cells that the colour can be changed on, you could use protection but make that column "unlocked" - this would allow colour changes but, for obvious reasons, horizonatal merging would not be possible Rgds
~Geoff~
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top