Change VBA to paste special

RAB29

New Member
Joined
Sep 28, 2021
Messages
12
Office Version
  1. 2010
Platform
  1. Windows
I am using the macro below however its copying formulas not values. How do i change this so it paste special please?

Sub Move_FlightPath()

'SelectedCell = ActiveCell.Address
If Selection.Value = "In The Hangar Waiting" Then
Workbooks.Open "V:\1 EBS Management System DO NOT CHANGE DOCUMENTS Q\Continuous Improvement\Continuous Improvement\C.I. Projects\Proposal Documents\Flight Path trial.XLSM"
Workbooks("Enquiry Proposal Trial.XLSM").Activate
'Worksheets("Enquiry").Activate
'Range(SelectedCell).Activate
ActiveCell.Offset(, 1).Resize(1, 19).Copy Destination:=Workbooks("Flight Path trial.XLSM").Worksheets("In The Hangar Waiting").Range("B" & Rows.Count).End(xlUp).Offset(1, -1)
End If

End Sub
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
How about
VBA Code:
Workbooks("Flight Path trial.XLSM").Worksheets("In The Hangar Waiting").Range("B" & Rows.Count).End(xlUp).Offset(1, -1).Resize(, 19).Value ActiveCell.Offset(, 1).Resize(1, 19).Value
 
Upvote 0
How about
VBA Code:
Workbooks("Flight Path trial.XLSM").Worksheets("In The Hangar Waiting").Range("B" & Rows.Count).End(xlUp).Offset(1, -1).Resize(, 19).Value ActiveCell.Offset(, 1).Resize(1, 19).Value
What would this replace please?
 
Upvote 0
The copy destination line in your code.
 
Upvote 0
Oops missed the = sign, it should be
VBA Code:
Workbooks("Flight Path trial.XLSM").Worksheets("In The Hangar Waiting").Range("B" & Rows.Count).End(xlUp).Offset(1, -1).Resize(, 19).Value = ActiveCell.Offset(, 1).Resize(1, 19).Value
 
Upvote 0
That works. Great thank you.
Any chance you can explain the difference to me please. I'm new to this and in process of teaching myself.
 
Upvote 0
When you use Copy destination, like you did, everything is copied, formula, formatting etc. However when using .Value=.Value it only copies the values & nothing else
 
Upvote 0

Forum statistics

Threads
1,214,839
Messages
6,121,891
Members
449,058
Latest member
Guy Boot

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top