LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Private subs

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.x ls"
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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining two Subs Petitboeuf Excel Discussion (Misc queries) 6 April 27th 06 03:42 PM
Stringing Subs Randal W. Hozeski Excel Programming 2 May 28th 04 04:05 PM
calling subs Mike Excel Programming 4 April 8th 04 08:22 PM
Recursive Subs? ExcelMonkey[_74_] Excel Programming 5 February 5th 04 02:54 AM
calling private subs dunlklee Excel Programming 1 December 16th 03 08:40 AM


All times are GMT +1. The time now is 03:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"