why wont it paste??

scuzz

Board Regular
Joined
Feb 1, 2004
Messages
57
Hi all,

Ive got a very annoying problem with my macro, and i have a feeling the solution is staring me in the face and is something very simple! :oops:

what ive got is two sheet. I'm copying one value from a sheet which is formatted as currency to another sheet and trying to paste it in the cell i want it to go. The cell i am pasting into is formatted for currency and is set to the same amount of d.p. I dont understand why the value will not paste!

Here is my code:

Application.ScreenUpdating = False
ActiveSheet.Unprotect
Range("C43").Select
Selection.End(xlUp).Select
Selection.Copy
Sheets("Data").Select
ActiveSheet.Unprotect
Range("B9").Select
Selection.End(xlUp).Select
ActiveCell.Offset(1, 0).Select
ActiveCell.PasteSpecial xlPasteValuesAndNumberFormats
Application.CutCopyMode = False
Sheets("Report").Select
ClearTakings
Application.ScreenUpdating = True
MsgBox ("Task Completed")
Application.ScreenUpdating = False
Workbooks.Open Filename:="C:\Documents and Settings\Owner\Desktop\Simon\Project\Main.xls"
Sheets("Main Menu").Select
ThisWorkbook.Save
ThisWorkbook.Close
End Sub
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

jimboy

Well-known Member
Joined
Apr 11, 2002
Messages
2,314
Try with just pastespecial or insert these two lines;

Selection.PasteSpecial Paste:=xlFormats
Selection.PasteSpecial Paste:=xlValues
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,168,082
Messages
5,857,251
Members
431,866
Latest member
Paula777

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
Top