3 Replies Latest reply: Dec 17, 2016 2:13 AM by Tamil arasu RSS

    How to define chartArray with variable?

    Andrius Sarkunelis

      Hey guy,


      I am trying to modify Macro for exporting certain tables to Excell. The only problem is that right now those tables are hard coded into macro and I need to change that to variable. Any help would be much appreciated.


      Right now part of my code looks like this:


      chartArray = Array("CH944", "CH893", "CH863", "CH878")

      Array("CH01", "CH02"))


          For Each chart In chartArray

          Set l = ActiveDocument.GetSheetObject(chart)

          chartCaption = l.GetCaption.Name.v


      I would like to switch  this part Array("CH944", "CH893", "CH863", "CH878") with a variable, any ideas on how can I accoplish that??