• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

How to Disable Cut Copy Paste in Multiple Columns

Nitesh Khot

Member
Hi..I have code to disable cut copy paste in single column ..but unable to disable multiple column i.e. Column - A , B , D, E,G,P,Q,R


Any one have idea how to this...

Thanks,
Nikh
 

Attachments

  • perticula range disable.xlsm
    20.8 KB · Views: 24
Change If statement after "Case Is = "Sheet1"" to something like below.
Code:
Select Case Sh.Name
    Case Is = "Sheet1"
        'Disable copy and paste for anything in column A:E, G, P, Q & R
        If InRange(rng, Union(Columns("A:E"), Columns("G"), Columns("P"), Columns("Q"), Columns("R"))) Then
            Call ToggleCutCopyAndPaste(False)
        Else
            Call ToggleCutCopyAndPaste(True)
        End If
 
Something like this ...
without any formulas ...
really disable multi column cut copy paste ...
 

Attachments

  • perticula range disable.xlsm
    23.2 KB · Views: 23
but i cant paste data copied from another workbook. if I want to allow paste for F column, what changes i need to do? pls help
 
Back
Top