Help in assigning a command button

G

Guest

Hi,

First of all, please excuse the crudeness of my code...I'm still learning,
but it works!!
Plus, I'm running Excel 97, my employer is woefully out of date!!

Anyways, I really want a dialog box to pop up with a space to fill in for
text to search an entire workbook for a name.

The included code selects all worksheets within my workbook then brings up
the ctrl+f box, but I'd like it to be a bit sleeker with the dialog box then
go straight to the text (in whatever worksheet).

Any ideas?

Many thanks in advance, Fybo.

Sub Macro1()
'
' Macro1 Macro
' Macro recorded 19/09/2005 by alan
'
' Keyboard Shortcut: Ctrl+u
'
Sheets(Array("January 2005", "February 2005", "March 2005", "April
2005", _
"May 2005", "June 2005", "July 2005", "August 2005", "September
2005", _
"October 2005", "November 2005", "December 2005", "Summary
2005")).Select
Sheets("January 2005").Activate

Application.Dialogs(xlDialogFormulaFind).Show
End Sub
 
D

Dave Peterson

I think you have a problem.

xl97 won't find across worksheets. Your code could cycle through all the
worksheets looking for your string and stop when it finds the first...

Or you may want to try Jan Karel Pieterse's FlexFind:
http://www.oaltd.co.uk/MVP/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top