jammer6_9
08-21-2013, 05:41 AM
Why i keep on having a Run-time error 1004 "Cannot change a part of a merge cell" and besides I do not have any merge cell in the sheets instead of Data Validation? is this considered as merge cell?
Private Sub CommandButton1_Click()
Dim Ws As Worksheet, rMyRg As Range
Set rMyRg = Range("d1:d54,f1:q54")
For Each Ws In Worksheets
UnProtectActiveSheet
Select Case Ws.Name
Case "Macro_Settings", "Master", "TOC", "Summary"
' do nthing
Case Else
Application.ScreenUpdating = False
rMyRg.ClearContents
End Select
Application.ScreenUpdating = True
Next Ws
ProtectActiveSheet
End Sub
Private Sub CommandButton1_Click()
Dim Ws As Worksheet, rMyRg As Range
Set rMyRg = Range("d1:d54,f1:q54")
For Each Ws In Worksheets
UnProtectActiveSheet
Select Case Ws.Name
Case "Macro_Settings", "Master", "TOC", "Summary"
' do nthing
Case Else
Application.ScreenUpdating = False
rMyRg.ClearContents
End Select
Application.ScreenUpdating = True
Next Ws
ProtectActiveSheet
End Sub