Hi All,
Im having an issue with a simple cut and paste vba code which I have used previously.
Im trying to copy from a range in one work book and paste values only into another. The problem Im having is, even after defining the workbook, sheet and cell location, Excel still asks me to hit enter before the latter part of the code can be executed.
Note: I have looked into using send keys to programmatically hit enter but it didnt work.
The code:
Is there a way to get around this?
Cheers
Im having an issue with a simple cut and paste vba code which I have used previously.
Im trying to copy from a range in one work book and paste values only into another. The problem Im having is, even after defining the workbook, sheet and cell location, Excel still asks me to hit enter before the latter part of the code can be executed.
Note: I have looked into using send keys to programmatically hit enter but it didnt work.
The code:
VBA Code:
Sub Copy_Contract_Reviews()
Dim wb As Workbook
Set wb = Workbooks.Open("C:\Users\Jeevan.Ruprai\XXXX\XXXXXXXXXX - General\Working Folders\Jeevan's Working Folder\KPI\Dummy Test\Feb 22 - Post Contract Review.xlsx")
Workbooks("Feb 22 - Post Contract Review.xlsx").Worksheets("MAPS Database").Range("A19:HD3000").Copy
Workbooks("BLANK_Consolidated KPI data collection (AOR data source) .xlsm").Worksheets("Data Import").Range("A2").PasteSpecial Paste:=xlPasteValues
Application.SendKeys ("~")
ActiveWorkbook.RefreshAll
MsgBox "All tables refreshed!"
End Sub
Is there a way to get around this?
Cheers