View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jackie Jackie is offline
external usenet poster
 
Posts: 78
Default Move Multiple Sheets - Name Variable

Hi-

I am trying to create a macro that will generate multiple sheets and then
move them all to a new book. The sheet names are variable based on entries
in a particulatar column. I have a million other questions,but I am very
very new to VB code so I need to keep it simple. I'll learn one thing at
time.

The 'Strategic Goals' tab has a list of names and I am trying to generate
statements for each person. The statement tab is generated with the name of
the person as the name of the tab.

Sub Statement_Generator()

Sheets("Monthly Statement").Copy After:=Sheets(Sheets.Count)
Range("C5").Select
ActiveCell.FormulaR1C1 = "='Strategic Goals'!R[-3]C[-2]"
ActiveSheet.Name = ActiveCell.Text


Sheets("Monthly Statement").Copy After:=Sheets(Sheets.Count)
Range("C5").Select
ActiveCell.FormulaR1C1 = "='Strategic Goals'!R[-2]C[-2]"
ActiveSheet.Name = ActiveCell.Text

End Sub