none
Move, expand or contract (adjoining cells) formatting using Mouse Down like MS Project RRS feed

  • Question

  • I'm somewhat fluent in VBA but this has me stumped.  Can I use MOUSEDOWN (or whatever) when clicking and holding the left mouse button down in the middle of a cell (or range of adjoining cells) to drag the formatting back and forth (or increase or decrease the number of cells formatted) like you can in GanttView in MS Project?  I know this behavior is already implemented to a degree just by hovering over either end of a cell (or range of cells) and then clicking and dragging on the "+" sign but what I'm looking to do is replicate the behavior a closely as possible to that of Project.

    Hope that makes sense!  Any help would be greatly appreciated.

    Monday, January 29, 2018 7:17 PM

All replies

  • Hi B N Allen,

    You had mentioned that,"Can I use MOUSEDOWN (or whatever) when clicking and holding the left mouse button down in the middle of a cell (or range of adjoining cells) to drag the formatting back and forth (or increase or decrease the number of cells formatted)"

    There is not any event available which execute on clicking left mouse button or on drag.

    You need to change your logic to fulfil your requirement.

    MS Excel and MS Project both are different application.

    It is not possible that what you can do in MS Project also you can do it in Excel in a same way.

    As a work around, What you can do is first select the cells on the sheet and then call your VBA code to apply the formatting on selected area.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, January 30, 2018 5:30 AM
    Moderator