LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to have a macro simply issue the "find" command or "control f: Charles Adams Excel Programming 3 February 6th 09 06:34 PM
"Form / Button" Macro for Unhiding Sheets Melissa Excel Discussion (Misc queries) 0 September 5th 08 06:07 PM
Macro for "Next" Button on User Form? Goth Excel Programming 1 December 4th 07 02:38 AM
command button and the "enter" and "tab" keys dr chuck Excel Programming 10 September 11th 06 12:09 AM
set up a command button or macro for open file to "save as" Mo Excel Programming 1 June 23rd 05 12:19 AM


All times are GMT +1. The time now is 01:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"