View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
cheeser83 cheeser83 is offline
external usenet poster
 
Posts: 13
Default Running Two Macros as One

First Module:

Public Sub CopyPaste()

'
Sheets("Forecast Report").Select 'Copies Total Yards from
currenct Forecast and pastes
Range("E105").Select 'to LST FRCST PRDCT
Total for the new Forecast Report
Selection.Copy
Range("AL105").PasteSpecial xlPasteValues




End Sub

Second Module:

Sheets("Worksheet").Select
'Pastes "January" in Month headers
Range("B4").Select
ActiveCell.FormulaR1C1 = "January"
With ActiveCell.Characters(Start:=1, Length:=7).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
Sheets("Forecast Report").Select
Range("B3").Select
ActiveCell.FormulaR1C1 = "January"
With ActiveCell.Characters(Start:=1, Length:=7).Font
.Name = "Arial"
.FontStyle = "Bold"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = 2
End With
Range("B4:B6").Select
End Sub

I need to run one module and then the other. The order doesn't matter.
However, I will have 12 modules similar to module 2, one for each
month. I don't want to just paste the code from module 1 into two
because I will be adding to it later.
Jim Thomlinson wrote:
Post your code...
--
HTH...

Jim Thomlinson


"cheeser83" wrote:

I have to Macros. The first one will copy data from one sheet and
paste it to another. The second one will then change the data in
certain cells to the proper Month Name.

What I would like to do is have one macro for each month. After it
inputs the proper month name, it then runs the copy and paste macro.
Is there a way to do this???

Any help is MUCH appreciated!