LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 135
Default CutCopyMode=False does not work

I am using vba in one workbook to make changes in a target workbook. I used
application.cutcopymode=false to clear the clipboard, but it doesn't seem to
work correctly. I have the clipboard visible to the side of the window, and
all of the copy/paste operations remain in the clipboard.

Here is the code I am using:
Option Explicit
Sub auto_open()
Dim FileName As Variant
Application.ScreenUpdating = False

FileName = Application.GetOpenFilename
If FileName = False Then Exit Sub

Dim WB As Workbook
Set WB = Workbooks.Open(FileName)

ThisWorkbook.Worksheets("Sheet1").Activate
ActiveSheet.Cells.Copy
WB.Worksheets("Sheet1").Range("A1").PasteSpecial
WB.Worksheets("Sheet2").Range("A3:D3").Copy
WB.Worksheets("Sheet2").Range("A4:D4").PasteSpecia l xlPasteFormats
WB.Worksheets("Sheet2").Range("B5:G5").Copy
WB.Worksheets("Sheet2").Range("B7:G9").PasteSpecia l xlPasteFormats
Application.CutCopyMode = False
WB.Worksheets("Sheet1").Activate
ActiveSheet.Range("A1").Select
Application.CutCopyMode = False
Application.ScreenUpdating = True
ThisWorkbook.Close savechanges:=False
End Sub



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
What's the best way to toggle between true and false in Excel? Hiall, My excel work involves a lot of toggling between true and false (booleantypes) ... and it's very repetitive... Is there a way to select a bunch ofcells, and press a key short-cu LunaMoon Excel Discussion (Misc queries) 9 July 29th 08 12:28 AM
$C$1972,2,FALSE, $C$1972,3,FALSE is ok, But $C$1972,4,FALSE Give # Steved Excel Worksheet Functions 6 July 3rd 06 01:49 AM
IF(a1="x",(vlookup 18K rows,2,false),(vlookup 18K,3,false)) RAM? bchilt Excel Worksheet Functions 6 January 20th 06 09:21 AM
Counting dates in multiple work sheets and work books Savage Excel Discussion (Misc queries) 0 December 19th 05 11:41 PM
Is there away to keep "auto save" from jumping to the first work sheet in the work book? Marc New Users to Excel 2 April 21st 05 01:27 AM


All times are GMT +1. The time now is 08:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"