View Single Post
  #1   Report Post  
KeriM KeriM is offline
Member
 
Posts: 70
Default If Macro Run From Form Control Button/Shape, "Find" Command Not Working

I have an unusual problem and I'm not sure how to fix it. I'm using excel 2007 and I have a workbook that has a series of form buttons programmed to run macros.

On one of the buttons, I have a "stop" command in the macro so that I can manually do a find on a name and then I contine the macro. For some reason, when the macro is launched from the button, pressing "Ctrl+F" or writing the "find" function in the macro, does not appear to do anything. I don't even get a "cannot find what you're looking for" dialog.

What I found is that when the button is pressed, whatever cell is currently selected becomes the "find" area, which is why it is not finding anything. When I select all the cells and do a find, it finds what I'm looking for.

I have tried both a shape and a button to run the macro and both produce the same outcome. I tried to attach a sample workbook to illustrate my problem, but it wouldn't accept the attachment. It should be easy enough to reproduce:

1. Open a new excel workbook and create a new macro with just the word "Stop" in the sub-routine.
2. In the excel workbook, create a form button or shape and assign the macro you just wrote to the button.
3. Write the word "Holiday" in cell "A3"
4. Press the button to run the macro.
2. When the macro stops, select any cell in the workbook (except for cell A3) and do a Ctrl+F and search for "Holiday." You'll see that nothing happens.
3. Select all the cells and do the same thing, and the cell with "Holiday" will be outlined.

Does anyone know why this happens and is there a solution? Thanks!

Last edited by KeriM : September 8th 14 at 04:07 PM