Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cognos VBA for Saving an Analyst Cube in Excel?

Status
Not open for further replies.

jim2011

IS-IT--Management
Jun 26, 2012
5
0
0
US
thread401-1156378

I'm trying to program a VBA script to automatically update data in an Analyst Cube and save it. The problem comes with attempting to save. The Analyst_CubeSave macro in the Excel Plugin prompts for which Cube to save. I saw someone had the following code using the "Analyst_SaveButton" macro but I am getting a "VB Error 1004 in Anlyst_XLA.Analyst_SaveButton at 110: Unable to get the DrawingOBjects property of the Worksheet class" when attempting to call it through VBA similar to the below script I found here. Executing the TextBox from the Excel sheet that it modifies works fine, I just can't call it through VBA.

Sub SaveCube()

ActiveSheet.Shapes("Text 8974").Select
ActiveSheet.Shapes("Text 8974").Select
Selection.Characters.Text = "Save" & Chr(10) & "" & Chr(10) & "" & Chr(10) & "" & Chr(10) & "" & Chr(10) & "_" & Chr(10) & "sheet1!analyst_view_1"
With Selection.Characters(Start:=1, Length:=31).Font
.Name = "Tahoma"
.FontStyle = "Negrita"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Range("F10").Select
Application.DisplayAlerts = False
Application.Run "Analyst_SaveButton"

End Sub

Any ideas?

Thanks,
Jim
 
Have you posted in forum707 (VBA Visual Basic for Applications (Microsoft) Forum)?

The problem looks to be in the VBA routine "Analyst_SaveButton"





soi là, soi carré
 
I'll try posting there too. I didn't post there initially since the Analyst_SaveButton macro is a part of the Cognos Analyst plugin. It's stored in an XLA file. The issue is that the XLA file is locked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top