Paste

Paste using VBA

Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
Sub Macro13()

'This Code is only for paste formate

    If ActiveSheet.ProtectContents = False Then
        On Error Resume Next
        If Application.CutCopyMode = False Then
            Beep
            MsgBox "No formatting in Clipboard"
        Else
            Selection.PasteSpecial Paste:=xlFormats
        End If
        Exit Sub
    Else
        MsgBox "Please unprotect this worksheet"
    End If
    
End Sub

Total Page Visits: 141 - Today Page Visits: 2

Leave a Reply