none
The VBA Eval function RRS feed

  • Question

  • Doesn't Word VBA expose or otherwise make available this function?

    I have a need to reference a series of list boxes who were created and named dynamically, i.e. lst0, lst1, etc.

    How can I reference the list boxes? Thanks.
    Facebook: Zamdrist
    Roleplaying: Elliquiy
    Friday, September 23, 2011 5:02 PM

Answers

  • Hey Steve (Zamdrist),

    You add the Access Object Library reference to your project, and then you can make use of the Eval function.

    FYI though, you really didn't need to use the Eval function in this case, i.e.

    mMain.Pages(X).Controls(0).Column = lForms

    ;)
    Facebook: Zamdrist
    Roleplaying: Elliquiy
    • Marked as answer by ITMn0403 Friday, September 23, 2011 5:53 PM
    Friday, September 23, 2011 5:52 PM

All replies

  • Hey Steve (Zamdrist),

    You add the Access Object Library reference to your project, and then you can make use of the Eval function.

    FYI though, you really didn't need to use the Eval function in this case, i.e.

    mMain.Pages(X).Controls(0).Column = lForms

    ;)
    Facebook: Zamdrist
    Roleplaying: Elliquiy
    • Marked as answer by ITMn0403 Friday, September 23, 2011 5:53 PM
    Friday, September 23, 2011 5:52 PM
  • Hi Zamdrist,

    Glad to see you have resolved this issue and thanks for your sharing. This could be beneficial to other community members as well.

    Have a nice day.

    Best regards


    Liliane Teng [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, September 26, 2011 10:09 AM
  • Hi Zamdrist,

    Glad to see you have resolved this issue and thanks for your sharing. This could be beneficial to other community members as well.

    Have a nice day.

    Best regards


    Liliane Teng [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    It would be useful if MS just made the function available to Word without having to extraneously reference the Access object model.
    Facebook: Zamdrist
    Roleplaying: Elliquiy
    Monday, September 26, 2011 4:10 PM