S
StargateFan
I have a protected sheet with floating toolbar (XL2003) that I need to
add a macro to that allows me to merge any number of selected cells.
The recorded macro part seems to work well but was hoping to add a
warning message when only one cell is selected so that the user is
aware that more than one cell needs to be selected.
Here is my initial code:
*************************************************
Sub Merge_cells()
'
ActiveSheet.Unprotect 'place at the beginning of the code
Selection.Merge
ActiveSheet.Protect ' place at end of code
End Sub
*************************************************
add a macro to that allows me to merge any number of selected cells.
The recorded macro part seems to work well but was hoping to add a
warning message when only one cell is selected so that the user is
aware that more than one cell needs to be selected.
Here is my initial code:
*************************************************
Sub Merge_cells()
'
ActiveSheet.Unprotect 'place at the beginning of the code
Selection.Merge
ActiveSheet.Protect ' place at end of code
End Sub
*************************************************