04-09-2010 04:18 PM
I am using activeX controls for excel including the classes Excel._Application, Excel._Workbook, and Excel._Worksheet. I used an open automation refnum to open the application class, then I used property nodes to get to the workbook and worksheet classes. Now I want use the Excel.FormatCondition class. I couldn't get to the class with nodes and methods, so I'm using an open automation refnum as before, but I'm getting "Error 3005 occurred at Automation Open".
I found another post with advice to register the controls, but I read that the excel activeX controls don't need to be registered--they just work in windows.
If I do need to register something, I dont' know what. I'm using LabVIEW 8.6, and Office 2007.
Andrew
Solved! Go to Solution.
04-09-2010 04:56 PM
04-09-2010 06:34 PM
You are most of the way there. Before you can format anything, you need to specify the range to which it applies. From the worksheet use the Invoke node Range. Specify the range you need, and then you can cascade the FormatCondition to the range output. For convenience, you can also insert the EntireColumn, EntireRow, UsedRange or CurrentRegion.
You don't mention how you got from Workbook to Worksheet, but you need the Invoke node Item to get from property node Worksheets followed by a Variant to Data with a worksheet constant at the top.
04-12-2010 11:55 AM
Here's a picture (scaled-down excerpt of my project) to show how I'm opening the application class and using invoke nodes and property nodes to get to the workbook and worksheet classes. I used a cluster to group the classes that I use later on, so you'll notice that I'm not closing the classes in this exceprt.
I went through all the drop-down menu's in the invoke nodes and property nodes and I couldn't find a way to get to "FormatCondition" so I figured I'd have to use an automation refnum, and select the "Excel.FormatCondition" class, and another automation open (which is what I tried showing earlier). I understand I have to specify a range, but I'm not quite there yet. (Sorry if I mis-led you, Michael, with my first attachment.)
Does that clear up my question?
Andrew
04-12-2010 12:57 PM
04-12-2010 02:42 PM
04-12-2010 03:50 PM
04-12-2010 05:52 PM