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

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Try with just pastespecial or insert these two lines;

Selection.PasteSpecial Paste:=xlFormats
Selection.PasteSpecial Paste:=xlValues
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,037
Members
448,543
Latest member
MartinLarkin

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