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!
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
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!
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