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
 

Some videos you may like

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

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
 

Watch MrExcel Video

Forum statistics

Threads
1,122,804
Messages
5,598,151
Members
414,214
Latest member
marketingnumbersguy

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