Answered Excel VBA and PowerShell

  • Montag, 14. Mai 2012 19:27
     
     

    Is it possible to work with a Active-X control in Excel from PowerShell? Basically I have a TreeView Control on a sheet and the only way to work with this control is through VBA. I am writing a PowerShell script to get the data I would like to be in the treeview, but have no idea how to do it, or if it can even be done.

Alle Antworten

  • Donnerstag, 17. Mai 2012 00:31
     
     Beantwortet

    It is usually fairly easy to convert a VBA macro to powershell. If you could do the following:

    Turn on Macro-Recording in Excel, Go through the steps to create your Tree view and then save the macro.

    Next go to your macro editor, open the new macro, copy and past it here and I'll give it a look.

    OldDog