Consulting

Results 1 to 7 of 7

Thread: Solved: Disable the move or copy sheet

  1. #1
    VBAX Mentor
    Joined
    Oct 2007
    Posts
    372
    Location

    Solved: Disable the move or copy sheet

    I've used the code on the kb to disable run of he mill copy and pasting. Suggestions on how to disable just right clicking the tab at the bottom and clicking move or copy would be appreciated!

    Thanks

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]

    Application.CommandBars("ply").Controls("Move or Copy...").Enabled=False
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Mentor
    Joined
    Oct 2007
    Posts
    372
    Location
    would that go within the workbook_open code then =true at workbook_beforeclose ???

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Either there or in Workbook Activate/Deactivate events.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  5. #5
    Knowledge Base Approver VBAX Guru GTO's Avatar
    Joined
    Sep 2008
    Posts
    3,368
    Location
    Hi Bob,

    I must admit I feel a bit like the young student questioning the teacher, but would not you consider the Activate/Deactivate events a much better choice (presuming one does not wish to hide/kill a command/whatever for all wb's in the instance)?

    Thank you,

    Mark

  6. #6
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Yes Mark, I do. That is why I suggested it in the previous post.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  7. #7
    VBAX Mentor
    Joined
    Oct 2007
    Posts
    372
    Location
    gracias

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •