Jump to content
Macro Express Forums

Excel options toggle


nmanager

Recommended Posts

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.

Link to comment
Share on other sites

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.

post-2725-1216241464_thumb.jpg

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...