Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone!
I wanted to know how to dynamically load an array via a macro.
CIAO!
Daniela
you can simulate an array by loading to a table and using functions like fieldvalue.
But this is not dynamic array but static!
I need dynamic!
Daniela
Can you give an example of how you intend to use this array?
Excuse my English .......... maybe I can not explain!
I want to dynamically load the list of objects in an array.
This is an array
bildArr = Array("CH112", "CH113", "CH123", "CH115", "CH144", "CH124", "CH125", "CH126", "CH127")
I want to make a macro that loads at runtime
Daniela [:'(]
Try using this in your macro...
Objects = ActiveDocument.ActiveSheet.GetSheetObjects
For i = lBound(Objects) To uBound(Objects)
.... do something ....
next
OK!
But with that education is the loading of the array???
Daniela[:'(]
Daniela wrote:
But this is not dynamic array but static!
I need dynamic!
Daniela<div></div>
sorry...I got confused with the "dynamically load an array" part.
a couple of questions: what values do you want to load in your array and when will you be reloading/resizing it?
Quote: "But with that education is the loading of the array???"
Sorry, this lost something in the translation.
The 'Objects' in the code that I posted above is the array, and this gets loaded when the macro runs. You can set macros to run on various events (such as opening the document) or to run from a button. It will be dynamic in the sense that it will be recreated when the macro runs - it will hold all objects on the active sheet (as I have quoted it), and if you add another object that will be included next time the macro runs.
Perhaps you could create a QlikView document and load it to the Forum. If you point out what works and what you still need to do, there are people that can 'fix' it and post back the answer.