View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Incidental Incidental is offline
external usenet poster
 
Posts: 226
Default Deleting contents from merged cells from VBA

Hi AVR

The following is just modified code from excel help

Option Explicit
Dim Ma As Range

Private Sub CommandButton1_Click()

Set Ma = Range("Range1").MergeArea

If Range("Range1").MergeCells Then

Ma.ClearContents

End If

End Sub

Hope it helps

S