C
Chris - RHD
I'm using Hyperion Financial Manager (HFM) and would like to write a macro
that opens a file, updates header information, refreshs the data using HFM,
saves, and closes. I've been able to create a macro that will do everything
but refresh the data using HFM. What can be done to make this happen for me?
This is the attempt I made. Thanks
Sub Update_HFM_pulls_for_closing()
'
' Update_HFM_pulls_for_closing Macro
' Macro recorded 10/30/2008 by alexac01
'
'
ChDir "K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates"
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\04 -
Midwest.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\05 -
PA-NJ.xls", _
UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\06 -
Ohio.xls", _
UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\07 -
Las Vegas.xls" _
, UpdateLinks:=3
Range("B4").Select
Sheets("Managers").Select
ActiveWindow.SmallScroll Down:=-9
Sheets("Chris Summary").Select
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\09 -
Mideast.xls" _
, UpdateLinks:=3
Sheets("Input").Select
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\10 -
SWFL.xls", _
UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\11 -
NFL.xls", _
UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\12 -
North Carolina.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\13 -
Virginia.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\14 -
Central Florida.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\15 -
Cyber Reps.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\16 -
Field Marketing.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\17 -
Embarq Sales Occupancy.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\18 -
Embarq Sales Managers.xls" _
, UpdateLinks:=3
Sheets("Summary").Select
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\19 -
Embarq Sales Persons.xls" _
, UpdateLinks:=3
Sheets("Summary").Select
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\20 -
Embarq Sales Planning.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\21 -
Embarq Sales Training.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub
that opens a file, updates header information, refreshs the data using HFM,
saves, and closes. I've been able to create a macro that will do everything
but refresh the data using HFM. What can be done to make this happen for me?
This is the attempt I made. Thanks
Sub Update_HFM_pulls_for_closing()
'
' Update_HFM_pulls_for_closing Macro
' Macro recorded 10/30/2008 by alexac01
'
'
ChDir "K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates"
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\04 -
Midwest.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\05 -
PA-NJ.xls", _
UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\06 -
Ohio.xls", _
UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\07 -
Las Vegas.xls" _
, UpdateLinks:=3
Range("B4").Select
Sheets("Managers").Select
ActiveWindow.SmallScroll Down:=-9
Sheets("Chris Summary").Select
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\09 -
Mideast.xls" _
, UpdateLinks:=3
Sheets("Input").Select
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\10 -
SWFL.xls", _
UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\11 -
NFL.xls", _
UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\12 -
North Carolina.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\13 -
Virginia.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\14 -
Central Florida.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\15 -
Cyber Reps.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\16 -
Field Marketing.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\17 -
Embarq Sales Occupancy.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\18 -
Embarq Sales Managers.xls" _
, UpdateLinks:=3
Sheets("Summary").Select
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\19 -
Embarq Sales Persons.xls" _
, UpdateLinks:=3
Sheets("Summary").Select
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\20 -
Embarq Sales Planning.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
Workbooks.Open Filename:= _
"K:\2008 Actual Analysis\Jeremy's Team\Embarq\Close Templates\21 -
Embarq Sales Training.xls" _
, UpdateLinks:=3
ActiveWorkbook.Save
ActiveWorkbook.Close
End Sub