Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cut and Paste Macro.
So I'm having an inputbox pop-up so I can have the data from that sheet
cut and pasted into the new sheet. It all seems to work, but the paste portion always errors out. Any ideas what I'm doing wrong? Thanks! Workbooks.Open Filename:=strFile Selection.CurrentRegion.Select Selection.Copy ActiveWindow.Close Worksheets("All Movements").Select Range("A1").Select ActiveSheet.Paste |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cut and Paste Macro.
|
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cut and Paste Macro.
I Believe it's because you have closed the workbook with .DisplayAlerts
disabled, which tells excel to blow away the large amounts of information in the clipboard. Try this order instead: Dim wb1 As Workbook Dim wb2 As Workbook Set wb1 = ActiveWorkbook Set wb2 = Workbooks.Open(strFile) Selection.CurrentRegion.Copy wb1.Worksheets("All Movements").Range("A1") wb2.Close -- Charles Chickering "A good example is twice the value of good advice." " wrote: So I'm having an inputbox pop-up so I can have the data from that sheet cut and pasted into the new sheet. It all seems to work, but the paste portion always errors out. Any ideas what I'm doing wrong? Thanks! Workbooks.Open Filename:=strFile Selection.CurrentRegion.Select Selection.Copy ActiveWindow.Close Worksheets("All Movements").Select Range("A1").Select ActiveSheet.Paste |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cut and Paste Macro.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy multiple worksheets of a workbook, and paste onto a Word document ( either create new doc file or paste onto an existing file.) I need this done by VBA, Excel Macro | Excel Programming | |||
Copy and Paste macro needs to paste to a changing cell reference | Excel Programming | |||
Cut and Paste using Macro gives paste special method error | Excel Programming | |||
Macro to Paste to specific line, and continue to Paste each time on next row not over | Excel Programming | |||
Macro to Copy/Paste then Paste to Next Line | Excel Programming |