none
Setting CutCopyMode to False RRS feed

  • Question

  • Hello,

    I am trying to do this.

    Inside Visual Studio, the following line allows 2 selections - xlCopy and xlCut

    Range1.Application.CutCopyMode = XlCutCopyMode.

    However, the excerpt from the help link indicates that there are 5 possible selections.

    XlCutCopyMode can be one of these XlCutCopyMode constants.

    False Not in Cut or Copy mode
    xlCopy In Copy mode
    xlCut In Cut mode
    False Cancels Cut or Copy mode and removes the moving border.
    True Cancels Cut or Copy mode and removes the moving border.

    I have several questions about this:

    Most importantly, how can I code False in Visual Studio, so my code turns off CutCopyMode? When I enter False, I get an Option Strict conversion issue from a Boolean to an Enum. (I guess I could just assign the value 0? Maybe this is a universal rule about Enums?)

    But also:

    Why are there 2 False options out of the 5 listed?

    How can True and False achieve the same result?

    Sorry, I had trouble pasting in a hyperlink to such help page...

    https://docs.microsoft.com/en-us/dotnet/api/microsoft.office.interop.excel._application.cutcopymode?f1url=https:%2F%2Fmsdn.microsoft.com%2Fquery%2Fdev15.query%3FappId%3DDev15IDEF1%26l%3DEN-US%26k%3Dk(Microsoft.Office.Interop.Excel._Application.CutCopyMode);k(TargetFrameworkMoniker-.NETFramework,Version%3Dv4.6.1);k(DevLang-VB)%26rd%3Dtrue%26f%3D255%26MSPPError%3D-2147217396&view=excel-pia

    Thanks for your help.

    Keith


    R K Howard

    Friday, January 18, 2019 1:25 PM