sirkerry Posted September 15, 2009 Posted September 15, 2009 Is there any way to set the value of a combobox control embedded in an Excel worksheet from AutoIt?
Juvigy Posted September 16, 2009 Posted September 16, 2009 Yes , i saw something like that on the MSDN excel/VBA object model. How exactly - check out the MSDN. Later i will check it out myself if you havent succeeded.
sirkerry Posted September 16, 2009 Author Posted September 16, 2009 No luck on the MSDN site. I have discovered it's actually a DropDown object that I need to set (it's either Excel.DropDowns or Excel.DropDown) so I've been messing around with AutoIT's COM support and have gotten the basics down (the same kinda stuff you can do with the Excel UDF), I'm not have any sucess accessing the DropDown objects embedded in my Excel worksheet. So any help I can get on this would be great.
sirkerry Posted September 17, 2009 Author Posted September 17, 2009 No luck on the MSDN site. I have discovered it's actually a DropDown object that I need to set (it's either Excel.DropDowns or Excel.DropDown) so I've been messing around with AutoIT's COM support and have gotten the basics down (the same kinda stuff you can do with the Excel UDF), I'm not have any sucess accessing the DropDown objects embedded in my Excel worksheet. So any help I can get on this would be great. Finally figured it out after reading several web pages about COM objects and lots of trial and error: $oExcel = ObjCreate("Excel.Application") WITH $oExcel .Visible = 1 .WorkBooks.Open($sFilePath) .ActiveWorkBook.ActiveSheet.DropDowns("Drop Down 107").Value = 2 ;this gives you access to the DropDowns sleep(4000) .ActiveWorkBook.Saved = 1 .Quit ENDWITH
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now