Consulting

Results 1 to 6 of 6

Thread: Sleeper: Disable CellDragAndDrop for FillRight AND FillLeft

  1. #1
    VBAX Contributor
    Joined
    Oct 2004
    Posts
    159
    Location

    Sleeper: Disable CellDragAndDrop for FillRight AND FillLeft

    Is there any method to disable CellDragAndDrop during FillLeft and FillRight, i.e only allow FillDown?

    Thanks
    Emily

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Application.CellDragAndDrop = False

    This will disbable all Drag and Drop functionality, however, the user could just change the setting to re-enable Drag and Drop in their options.

    You can disable the options like this:


    Application.CommandBars("Worksheet Menu Bar").Controls("&Tools").Controls("&Options...").Enabled = False

    But then the user could reset the Command Bar, so we have to shut that down as well.


    Application.CommandBars.DisableCustomize = True

  3. #3
    VBAX Contributor
    Joined
    Oct 2004
    Posts
    159
    Location
    Thanks DRJ

    But how can I place FillLeft, FillRight in the "Option"?

  4. #4
    VBAX Mentor Justinlabenne's Avatar
    Joined
    Jul 2004
    Location
    Clyde, Ohio
    Posts
    408
    Location
    Off-hand: No.

    After researching a bit: No

    You can disable the cell drag and drop entirely using the first fo DRJ's code lines that he posted, but I really have never heard of, nor can think of a way to do this. Maybe a macro is in order that will perform the Fill-Down for you, and then disable drag and drop so the user cannot drag and drop in any direction. but the code would replicate what you are trying to achieve.

    For anyone working on a solution this is Cross-Posted at MrExcel.com
    Last edited by Justinlabenne; 07-16-2005 at 11:23 PM. Reason: Could not find spell-check, and I can't spell or see I guess
    Justin Labenne

  5. #5
    VBAX Contributor Ivan F Moala's Avatar
    Joined
    May 2004
    Location
    Auckland New Zealand
    Posts
    185
    Location
    Here is a thought ...
    You could detect the left button down AND Statusbar text to detect a Fill via a Timer / hook procedure.
    Have I tried this (not this particular scenario but similar) ... NO .... doable Yes .... sorry no time to try this out.
    You would need Xl2000+ to do what I think can be done via the Addressof operator.
    Kind Regards,
    Ivan F Moala From the City of Sails

  6. #6
    VBAX Mentor Justinlabenne's Avatar
    Joined
    Jul 2004
    Location
    Clyde, Ohio
    Posts
    408
    Location
    Leave it to Ivan to have an idea on how to do the seemingly impossible. Any time I have a doubt I will email you first to check for the possiblity.


    (kidding, that would be alot of mail)
    Justin Labenne

Posting Permissions

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