I'm working with Hyperion Smart View and was wondering if anyone knew of the VBA add ons that would allow me to refresh and drill in data? Below you'll see the code I'm working on. Currently I'm using SendKeys to accomplish the two tasks as you'll see below. What's a better way to do this?
Thanks in advance for the help!
Thanks in advance for the help!
Code:
Sub Pull_Actuals()
Sheets("Geographic Data").Select
Dim objEntity As Object
Dim rngEntity As Range
Set rngEntity = Sheets("Geographic Data").Range("C6", Range("C6").End(xlDown))
For Each objEntity In rngEntity.Cells
Call Update_Actuals(objEntity)
Next objEntity
End Sub
Sub Update_Actuals(objEntity)
'Update Actuals
Sheets("Actuals Data").Activate
Range("A6").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.ClearContents
Range("B6").Value = "OPEXIN"
Range("D6").Value = "TOTBU"
Range("C6").Value = objEntity.Value
Sheets("Inputs").Select
Range("B3").Select
Selection.Copy
Sheets("Actuals Data").Activate
Range("A6").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("E6").Select
'Essbase Refresh (Code Does Smart View Refresh)
SendKeys "%sy5r", True
DoEvents
Range("B6").Select
'Zoom in to bottom level (Essbase Menu)
SendKeys "%y1y2b", True
DoEvents
Range("A6").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Actuals - Outputs").Select
If IsEmpty(Range("A2").Value) Then
Range("A2").Select
Else
Range("A1").End(xlDown).Offset(1, 0).Select
End If
Selection.PasteSpecial Paste:=xlPasteValues
Sheets("Geographic Data").Select
End Sub