Follow

Call UpSlide Features from VBA

Starting with version 4.4.1.0, you can call some of UpSlide features directly from a VBA macro.

The following features are available in Excel:

  • Create custom charts such as Waterfall or Marimekko 
  • Update custom charts
  • Smart Format
  • Export to PowerPoint or Word

The following features are available in PowerPoint and Word:

  • Update UpSlide link 
Application Feature Method signature
Excel Create custom charts CreateChart Type*
Excel Update custom charts UpdateUpslideCharts
Excel Smart Format SmartFormatSelection
Excel Export to PowerPoint ExportSelectionToPowerPoint
Excel Export to Word ExportSelectionToWord
PowerPoint Update UpSlide link UpdateLinksInSelection
Word Update UpSlide link UpdateLinksInSelection

 * The argument Type can take the following values

Waterfall 1
Marimekko (Value) 2
Marimekko (%) 3
Stacked Waterfall 4

Here is an example of how you would typically call an exposed UpSlide method from your VBA code :

Option Explicit

Private Enum ChartType
      Waterfall = 1
      Marimekko = 2
      MarimekkoPercent = 3
      StackedWaterfall = 4
End Enum

Private Function UpSlideAddin() As Object
      Set UpSlideAddin = Application.COMAddIns("Finance3point1.UpSlide.Excel").Object
End Function

Public Sub InsertWaterfall()
      Dim upSlide As Object
      Set upSlide = UpSlideAddin()
      If upSlide Is Nothing Then
            MsgBox "Cannot connect to the UpSlide Addin.", vbInformation + vbOKOnly, "UpSlide"
            Exit Sub
      End If
      upSlide.CreateChart ChartType.Waterfall
End Sub

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk