2 Replies Latest reply: May 3, 2012 3:29 AM by Subin Thomas RSS

    Macro parse failed


      My Macro does´t work using QV Server. I get the message

      Macro parse failed. Functionality was lost

      Error:Object Required ValorCeldaDimension(..)

      I pass this arguments:

      set myvar = ValorCeldaDimensionPivot("CH46", "Indirectos", 2, 9)

      and my funcction is: (to obtain the value of a cell in a pivot table where the text of the row =texto)

      Function ValorCeldaDimensionPivot(objeto, texto, dimens, col)
      set obj = ActiveDocument.GetSheetObject(objeto)
      dim fila
      fila = 0
      for RowIter = 0 to obj.GetRowCount-1
      set cell = obj.GetCell(RowIter,dimens)
      if cell.Text = texto then
      ValorCeldaDimensionPivot = obj.GetCell(fila, col)
      exit Function
      End if
      fila = fila + 1
      End Function

      Anybody can help me?