Results 1 to 7 of 7
  1. #1
    Lounger
    Join Date
    Jul 2001
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    User has macro that she views a flash

    User has macro that does below:
    With Sheets("Sheet1")
    .Range("M_FALSE").Copy
    .Range("A1:A86").PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=False
    .Range("M_TRUE").Copy
    .Range("A1,A6,A11,A16,A21,A27,A34,A42,A51,A70").Pa steSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=False
    End With

    Problem: When the macro copies a range and pastes it into another sheet, the user views a flash. The movement from one sheet to another when macro runs.
    Result wanted: To NOT view flash.
    <img src=/S/eyeout.gif border=0 alt=eyeout width=15 height=15>

  2. #2
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: User has macro that she views a flash

    jsm

    Add the following line to your macro:

    Application.ScreenUpdating = False.

    This line should be before the switch is made.

    BTW there are better ways to code this application, this seems that it was recorded, which is fine, but it could be cleaned up and made better.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  3. #3
    Lounger
    Join Date
    Jul 2001
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: User has macro that she views a flash

    I tried to make a simple example.
    I also include the line you gave Wassam (whether I DID put it in the correct place), thinking not since it is still occuring.
    Please take a look at file attached. Macro is on sheet 2 <img src=/S/duck.gif border=0 alt=duck width=23 height=23>
    Attached Files Attached Files

  4. #4
    Star Lounger
    Join Date
    Sep 2001
    Posts
    58
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: User has macro that she views a flash

    Not trying to step on any toes but just move the suggested line so it will be the very first line in the macro.

  5. #5
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    Re: User has macro that she views a flash

    jsm

    I'll work on it tonight and upload it for you to check tomorrow.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  6. #6
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: User has macro that she views a flash

    Try the macro below:

    <pre>Sub test2()
    Application.ScreenUpdating = False
    Sheets("Sheet1").Range("A4:A6").Copy
    Sheets("Sheet2").Paste Destination:=Sheets("Sheet2").Range("A4")
    Sheets("Sheet1").Range("test2range").Copy
    Sheets("Sheet2").Paste Destination:=Sheets("Sheet2").Range("test2range1")
    Application.CutCopyMode = False
    Application.ScreenUpdating = True
    End Sub
    </pre>

    Legare Coleman

  7. #7
    Lounger
    Join Date
    Jul 2001
    Posts
    30
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: User has macro that she views a flash

    It worked great! Thank-you all for your time and help! <img src=/S/fanfare.gif border=0 alt=fanfare width=31 height=23>

Posting Permissions

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