Mr_Musings
Board Regular
- Joined
- Feb 15, 2012
- Messages
- 67
Hi All
Im a fairly novice user of VBA. i have created a macro that is the culmination of a series of macros, as every time i did it in one go i managed to break it. however as smaller macro's i could manage them better. in the middle i have possible the simplest macro which is to copy a range in one worksheet and copy it to another worksheet. Code is as follows
This works perfectly when i run this Macro on its own. However when i run it as part of the "Parent" macro, it only works every 2nd time.
why would this be and how do i correct this.
thanks
tom
Im a fairly novice user of VBA. i have created a macro that is the culmination of a series of macros, as every time i did it in one go i managed to break it. however as smaller macro's i could manage them better. in the middle i have possible the simplest macro which is to copy a range in one worksheet and copy it to another worksheet. Code is as follows
PHP:
Sub No7_MoveDataToAnalysis()
'
' No7_MoveDataToAnalysis Macro
'
Sheets("Data").Select
Range("B1:B3500").Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Analysis").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
'
End Sub
This works perfectly when i run this Macro on its own. However when i run it as part of the "Parent" macro, it only works every 2nd time.
why would this be and how do i correct this.
thanks
tom