nmanager Posted July 15, 2008 Report Share Posted July 15, 2008 Anyone know how to tell which way an option box in an Excel window is toggled? Specifically, in Excel 2003 the CTL +F window (find) has an option box and I can't tell which way it is toggled. I tried the Get Control, but the window shows up as all the same control. Thanks for yor help in advance. Quote Link to comment Share on other sites More sharing options...
stan Posted July 15, 2008 Report Share Posted July 15, 2008 If I understand correctly, there is a knowledgebase article that describes what you want to do. The article title and URL are listed below. How can I determine the state of a checkbox or radio button? - http://www.macros.com/faq//1.49.html Quote Link to comment Share on other sites More sharing options...
nmanager Posted July 16, 2008 Author Report Share Posted July 16, 2008 Thanks Stan, I'm not sure the options in the article will help, but I will keep trying. The Get Pixel Color command may work. There is no check box. However, the "Options" box is in a different location depending on the state - active/inactive. The two states of the windows are shown in the attached picture. The problem with this option is the box may pop up in different areas of the screen on different size/style monitors. Quote Link to comment Share on other sites More sharing options...
paul Posted July 16, 2008 Report Share Posted July 16, 2008 You may be able to do something using the specified shortcut keys Alt-C for "Match case" and Alt-O for "Match entire cell contents". I'd start by discovering what changes between the 2 screens in your example when these keys are used. Quote Link to comment Share on other sites More sharing options...
stan Posted July 16, 2008 Report Share Posted July 16, 2008 Ok, I see what you are trying to accomplish. One option would be to use the Variable Set Integer command to grab the height of the Find window and save to a variable such as N1. Then run the If Variable command to find out which version of the window is open, based on whether or not N1 is greater than the size of the standard Find window. Or you can use Get Pixel Color option. Find a spot on the expanded window that has black text, but does not in the smaller window. Grab the pixel color and get the position relative to the window and not the screen. This way it doesn't really matter where on the screen the window is located. It looks for the pixel based on the number of pixels down and to the right of the upper left pixel in the window. Then use the If Variable command as mentioned in the article. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.