Forum Discussion

kelly_huffman's avatar
kelly_huffman
New Contributor
15 years ago

Capturing window name using Exel 2007

Hi,



I'm trying to capture a windows name using Set window = process.Form("New Folio - Crossfire Designer").   It never returnes a value.  (Took the code snip from the help files Work with the ribbon command bars.)  What the heck am I doing wrong?



OS - XP service pack 3.

Excel 2007 (Crossfire is an add in)

Have the MSAA plug in



Here is the code so far.



Sub Test

  Dim process, window, ribbon, tabs, tagging_tab

  Dim ribbon_area



  Set process = Sys.Process("EXCEL")  - returns the process yay!

  Set window = process.Form("New Folio - Crossfire Designer") - Fail



End Sub

3 Replies

  • Hi,



    Do you see the problematic object in the Object Browser? Does it help if you use the WaitForm method to obtain it and insert a wildcard in its name to ignore a part of it (WaitForm("*Crossfire Designer", 5000))?

  • Hi Jared,



    I see the object in the browser however the wait method does not return anything. 
  • Hi,



    What exact code do you use? Also, what do you mean by "the wait method does not return anything" - what value do you get as its result?