Chewyhairball
Active Member
- Joined
- Nov 30, 2017
- Messages
- 303
- Office Version
- 365
- Platform
- Windows
Hi
I am copying data from workbook 2(name changes) to workbook1(fixed name).
My code is stored in workbook1 and run from workbook 2 window. It has to be this way as workbook 2 is not mine and is locked.
Once the data has been copied from workbook2 it is pasted into workbook1.
What I would like to do is shutdown workbook2( or whatever it is called) without saving it.
I have tried doing it using
before activating worksheet1 which works to an extent and does close workbook2.
However it comes up with a message about large amounts of data on the clipboard and doesnt paste the data into worksheet 1.
any help is appreciated
thank Rory
I am copying data from workbook 2(name changes) to workbook1(fixed name).
My code is stored in workbook1 and run from workbook 2 window. It has to be this way as workbook 2 is not mine and is locked.
Once the data has been copied from workbook2 it is pasted into workbook1.
VBA Code:
Application.ScreenUpdating = False
Sheets("Sheet1").Select
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range("A1:DZ321").Select
Selection.Copy
Windows("Workbook1"). _
Activate
Sheets("Sheet1").Select
Range("A3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
What I would like to do is shutdown workbook2( or whatever it is called) without saving it.
I have tried doing it using
VBA Code:
ActiveWorkbook.Close savechanges:=False
However it comes up with a message about large amounts of data on the clipboard and doesnt paste the data into worksheet 1.
any help is appreciated
thank Rory