G
Guest
I have created the following private sub in my worksheet:
Private Sub CommandButton1_Click()
' Define a área de impressão
ActiveSheet.PivotTables("Pivot Table Show Price").PivotSelect _
"Produto[All]", xlLabelOnly, True
ActiveSheet.PageSetup.PrintArea = _
ActiveCell.CurrentRegion.Address
Range("A1").Select
End Sub
So, now I want to create a macro to do perform some actions (see below) and
to run this private sub as the last action of the macro below...how can I do
this?
Sub Copy_Log()
Application.Goto Reference:="Log"
Selection.Copy
Workbooks.Open Filename:="S:\Finance\Pricing\General\TimeTable1.xls"
Sheets("DB").Select
Application.Goto Reference:="Index1"
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=True
Range("A1").Select
Application.CutCopyMode = False
ActiveWorkbook.Save
ActiveWindow.Close
End Sub
Private Sub CommandButton1_Click()
' Define a área de impressão
ActiveSheet.PivotTables("Pivot Table Show Price").PivotSelect _
"Produto[All]", xlLabelOnly, True
ActiveSheet.PageSetup.PrintArea = _
ActiveCell.CurrentRegion.Address
Range("A1").Select
End Sub
So, now I want to create a macro to do perform some actions (see below) and
to run this private sub as the last action of the macro below...how can I do
this?
Sub Copy_Log()
Application.Goto Reference:="Log"
Selection.Copy
Workbooks.Open Filename:="S:\Finance\Pricing\General\TimeTable1.xls"
Sheets("DB").Select
Application.Goto Reference:="Index1"
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=True
Range("A1").Select
Application.CutCopyMode = False
ActiveWorkbook.Save
ActiveWindow.Close
End Sub