.ClipboardCut() resulting blank

Posted by: maverick123 on 8 September 2017, 2:39 pm EST

  • Posted 8 September 2017, 2:39 pm EST



    Hi Farpoint,



    I am trying to map Farpoint Spread Cut, Copy and Paste by my
    custom code. But doing so I am facing an issue that when the user perform cut
    operation thru Keyboard (Ctrl + X). The clip board always results blank.



    Farpoint Spread AutoClipboard = True



    My Code is as follows:



    Private Sub
    FpSpread1_KeyDown(ByVal sender As Object, ByVal e As
    System.Windows.Forms.KeyEventArgs) Handles FpSpread1.KeyDown



       
    mCutOperation = False



     



        If Control.ModifierKeys
    = Keys.Control Then



          If e.KeyCode = Keys.X
    Then



           
    mCutOperation = True



           
    e.Handled = True



          End If



        End If



     



      End Sub



     



      Private Sub
    FpSpread1_KeyUp(ByVal sender As Object, ByVal e As
    System.Windows.Forms.KeyEventArgs) Handles FpSpread1.KeyUp



     



        If mCutOperation Then



         
    FpSpread1.ActiveSheet.ClipboardCut()



        End If



     



      End Sub



     



    Please guide me in this regard.



    Thanks,



    Maverick.



  • Replied 8 September 2017, 2:39 pm EST

    If you put a break point in your KeyUp handler is a selection made? fpSpread1.ActiveSheet.GetSelections() should return a cellrange. If there is no CellRange selected then there will be no data cut to the clipboard
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels