My question is obscure, but I'm going to go for it anyway. I have a VB.Net form that opens a Search dialogue box to do a search based on the color in which the cells are filled. I'm using this piece of code to invoke the search dialogue (MyApp is an Excel Application object):
The action is to select the formatting screen and select a fill option. The code execution then does the following: 1) protect every cell in the worksheet; 2) search for the cells that have the fill option chosen in the search dialogue and strategically unprotect these cells; and 3) protect the worksheet with a predesignated password. The effect is to allow editing in all the cells that have a particular highlight and disallow it everywhere else.
Usually, the program works fine the first time around. But when I use the code line above in an attempt to select a new format, the color selection remains locked to its previously selected item. Interestingly, the format box is the only
part of the search box that is locked; I can set everything else. And curiously, when I open the search dialogue with the Excel interface, not the code line above, the fill section is not
I surmise that something about my first search for a given format locks that parameter. I'm wondering if there's either another coded way to open the dialogue to mimic the effect of opening it through the interface or a procedure that unlocks the fill selection after the code has done a search. I know when I pose it that the question, though obscure, may be something other EE experts have encountered and overcome. Here's hoping. ~Peter Ferber