I have an annoying small problem in that some simple code (within a larger macro) will not execute.
I have tried to record this, but despite recording, it wont work when used.
All I need to do is'..
From having three cells selected as one range (say A1 to C1),
Offset down one cell,
paste special as value (from clipboard),
This would then mean that excell offsets to cell A2, and paste special to cells A2 to C2.
Of course, just a component of a larger macro
Any ideas, please
Raymond Downham
Replies (3)
Please login or register to join the discussion.
Good grief, a VBA question to which I can contribute!
Hi Raymond
I am a complete novice at VBA, (see my 'announcement' below!) but I have already worked out that if you use named ranges in macros, especially for copy/paste excercises, it saves a lot of problems with making sure that the macro is in the correct place when it executes. If you name the source and the target, it will work even of the last reference was on a different worksheet.
Try
With Selection
.Copy
.Offset(1, 0).PasteSpecial Paste:=xlPasteValues
End With
Application.CutCopyMode = False