need help me in excel-vba

Posted by aos on Stack Overflow See other posts from Stack Overflow or by aos
Published on 2011-02-06T23:22:33Z Indexed on 2011/02/06 23:25 UTC
Read the original article Hit count: 173

Filed under:
Private Sub cmdClear_Click()
    Dim Confirm As Integer
    Confirm = MsgBox("Are you sure you want clear this Sheet?", vbYesNo, "WARNING: Date Changed")
    If Confirm = 6 Then
        Sheets("OPV").Activate
        'Sheets("OPV").Activate
        Sheets("OPV").Range("B4:BZ1000").ClearContents
        Sheets("OPV").Range("B4:BZ1000").Interior.Pattern = xlNone
        Sheets("OPV").Activate
        Sheets("OPV").Range("B4").Activate
        MsgBox " Done .. ", vbInformation, "Clear ......"
    End If
End Sub

© Stack Overflow or respective owner

Related posts about excel-vba