Darth Metal
New Member
- Joined
- Aug 24, 2011
- Messages
- 2
Hello,
I have a simple paste special (values) macro, the data that is to be pasted runs from column AI to AX. In Cell BA I have some formulas that take what I need from the pasted data. As I have other people pasting the data, I would like to know if there is a code that will prevent the user from overwriting the formulas to the right of cell AX (ie someone has copied the wrong report and tries to paste it in the wrong area).
I would like a custom error message to pop up if when someone runs the macro when the result would exceed the AI:AX range and prevent the data from being pasted.
Any help would be greatly appreciated.
Thank you
OS: XP
Office 2010
Existing Macro:
Range("AI3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub
I have a simple paste special (values) macro, the data that is to be pasted runs from column AI to AX. In Cell BA I have some formulas that take what I need from the pasted data. As I have other people pasting the data, I would like to know if there is a code that will prevent the user from overwriting the formulas to the right of cell AX (ie someone has copied the wrong report and tries to paste it in the wrong area).
I would like a custom error message to pop up if when someone runs the macro when the result would exceed the AI:AX range and prevent the data from being pasted.
Any help would be greatly appreciated.
Thank you
OS: XP
Office 2010
Existing Macro:
Range("AI3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub