G
Guest
Hi
The code below works without selecting the worksheet "Monthly" & copies data
from "Data" across.
Sub Transfer_Data_to_Monthly_Sheet()
Dim wsWig As Worksheet
Dim wsMth As Worksheet
Set wsWig = Workbooks("WESTPAC.xls").Worksheets("Data")
Set wsMth = Workbooks("WESTPAC.xls").Worksheets("Monthly")
wsWig.[O3232].Copy
wsMth.Cells(Rows.Count, "B").End(xlUp).Offset(1, 0).PasteSpecial _
Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.Run "'WESTPAC.xls'!Both_1_Month_UP"
End Sub
This macro also works OK. but jumps across to the "Monthly" worksheet
Sub Macro7()
Application.Goto Reference:="TransStatement"
Selection.ClearContents
End Sub
How do I ClearContents of a named range "TransStatement" on the "Monthly"
sheet without selecting the "Monthly" sheet?
Can someone please help, I now just cannot get the code right.
--
Thank you
Regards
Aussie Bob C.
Using Windows XP Home + Office 2003 Pro
The code below works without selecting the worksheet "Monthly" & copies data
from "Data" across.
Sub Transfer_Data_to_Monthly_Sheet()
Dim wsWig As Worksheet
Dim wsMth As Worksheet
Set wsWig = Workbooks("WESTPAC.xls").Worksheets("Data")
Set wsMth = Workbooks("WESTPAC.xls").Worksheets("Monthly")
wsWig.[O3232].Copy
wsMth.Cells(Rows.Count, "B").End(xlUp).Offset(1, 0).PasteSpecial _
Paste:=xlPasteValuesAndNumberFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.Run "'WESTPAC.xls'!Both_1_Month_UP"
End Sub
This macro also works OK. but jumps across to the "Monthly" worksheet
Sub Macro7()
Application.Goto Reference:="TransStatement"
Selection.ClearContents
End Sub
How do I ClearContents of a named range "TransStatement" on the "Monthly"
sheet without selecting the "Monthly" sheet?
Can someone please help, I now just cannot get the code right.
--
Thank you
Regards
Aussie Bob C.
Using Windows XP Home + Office 2003 Pro