+ Reply to Thread
Results 1 to 5 of 5

Why Application.CutCopyMode giving problem

  1. #1
    Kieranz
    Guest

    Why Application.CutCopyMode giving problem

    Hi
    When I start Excel2003, I can copy, cut and then paste. But when I go
    to VBE and even just create Sub ... End Sub without any codes and go
    back to Excel sheet problems...
    I type 'dfsdf' in a cell, and then copy (using Ctrl C, Edit Copy, Copy
    icon, right click shortcut menu, tried them all) the moving borders
    flashes for a while and then stops. meaning I can't paste. I have a
    strange feeling that its something to do with cutcopymode which I used
    in another workbook.

    Yes I tried Clipboard, which works but without formats and formulas.

    Help appreciated
    Kieranz


  2. #2
    Gary''s Student
    Guest

    RE: Why Application.CutCopyMode giving problem

    You haven't posted your code. Try something like this:


    Sub copysample()
    Dim r1, r2 As Range
    Set r1 = Range("A1")
    Set r2 = Range("B2")
    r1.Copy r2
    End Sub


    This works on the active sheet.
    --
    Gary's Student


    "Kieranz" wrote:

    > Hi
    > When I start Excel2003, I can copy, cut and then paste. But when I go
    > to VBE and even just create Sub ... End Sub without any codes and go
    > back to Excel sheet problems...
    > I type 'dfsdf' in a cell, and then copy (using Ctrl C, Edit Copy, Copy
    > icon, right click shortcut menu, tried them all) the moving borders
    > flashes for a while and then stops. meaning I can't paste. I have a
    > strange feeling that its something to do with cutcopymode which I used
    > in another workbook.
    >
    > Yes I tried Clipboard, which works but without formats and formulas.
    >
    > Help appreciated
    > Kieranz
    >
    >


  3. #3
    Kieranz
    Guest

    Re: Why Application.CutCopyMode giving problem

    Hi Gary
    I tried your code, but still it does not work. If there is no codes or
    VBA I can use cut/copy and paste as normal on any sheet. But when I
    write a code even Sub Hello() MsgBox "Hello" End Sub. (There is no
    other codes) the copy paste does not work.

    To see what was happening. I rebooted, opened Excel with only 3 blank
    sheets. Typed in sheet1 Cell B9 "dfsdf" started macro recorder and then
    pressed Cntl C to copy B9 to B10.
    this is what the recorder produced!!
    Sub trycopy()
    Selection.Copy
    Application.CutCopyMode = False
    Range("B10").Select
    Selection.Cut
    Application.CutCopyMode = False
    Range("B9").Select
    Selection.ClearContents 'this worked
    Range("B14").Select
    End Sub

    The copy showed a moving border for few seconds and then the paste
    failed.
    I dont know if there is a feature that could have been disabled.
    Thks
    K


  4. #4
    Gary''s Student
    Guest

    Re: Why Application.CutCopyMode giving problem

    I tried to reproduce what you did:

    1. entered dfsdf in cell B9
    2. turned on the Recorder
    3. re-selected B9
    4. CNTRL-C
    5 selected B10
    6 CNTRL-V
    7 turned off the Recorder

    This is what got recorded:

    Sub Macro2()
    Range("B9").Select
    Selection.Copy
    Range("B10").Select
    ActiveSheet.Paste
    End Sub

    and it works.
    --
    Gary's Student


    "Kieranz" wrote:

    > Hi Gary
    > I tried your code, but still it does not work. If there is no codes or
    > VBA I can use cut/copy and paste as normal on any sheet. But when I
    > write a code even Sub Hello() MsgBox "Hello" End Sub. (There is no
    > other codes) the copy paste does not work.
    >
    > To see what was happening. I rebooted, opened Excel with only 3 blank
    > sheets. Typed in sheet1 Cell B9 "dfsdf" started macro recorder and then
    > pressed Cntl C to copy B9 to B10.
    > this is what the recorder produced!!
    > Sub trycopy()
    > Selection.Copy
    > Application.CutCopyMode = False
    > Range("B10").Select
    > Selection.Cut
    > Application.CutCopyMode = False
    > Range("B9").Select
    > Selection.ClearContents 'this worked
    > Range("B14").Select
    > End Sub
    >
    > The copy showed a moving border for few seconds and then the paste
    > failed.
    > I dont know if there is a feature that could have been disabled.
    > Thks
    > K
    >
    >


  5. #5
    Kieranz
    Guest

    Re: Why Application.CutCopyMode giving problem

    Hi Gary,
    This is what i did
    1. entered fdsfsd in cell B9
    2. turned on the Recorder
    3. Reselected B9
    4. Pressed Cntrl C

    'PS at this stage i had a moving border or marquee around the cell
    but within seconds it disappeared and i couldnt do paste.
    By the way this is on a brand new workbook/sheet with no other workbook
    open or VBA in it.
    This is what got recorded:
    Sub tryy()
    Range("B9").Select
    Selection.Copy
    Application.CutCopyMode = False
    Range("B10").Select
    End Sub
    Very different from yours.
    Gary, if i do not have any vba codes in my workbook the copy/cut and
    paste performs as it should. But the moment i write a code even if it
    is just a blank sub ... end sub with no codes in between; i am unable
    to use the paste.
    Pls excuse me, i am in Zambia Africa on dial up. I have discussed with
    a number of IT chaps here but no luck. will catch up with U tomorrow.
    Mny thks and rgds K


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1