ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Find Macro across workbook (https://www.excelbanter.com/excel-worksheet-functions/62923-find-macro-across-workbook.html)

[email protected]

Find Macro across workbook
 
My find macro can find data across the entire workbook--across many
sheets, but when it finds the data, it doesn't *go* there. If I am
looking at one sheet and hit my macro, and the data is on another
sheet, it finds it on the other sheet, but it doesn't switch my view to
that next sheet. How do I do this?

my macro as it is now:

Sub seech()
'
' seech Macro
' Macro recorded 1/3/2006 by L Cloutier
'
' Keyboard Shortcut: Option+Cmd+q
'
Cells.FindNext(After:=ActiveCell).Activate
ActiveCell.Activate
End Sub


John Michl

Find Macro across workbook
 
I believe you need to activate the sheet before activating the cell.

- John


[email protected]

Find Macro across workbook
 
I'm a newbie; what syntax would I use to activate the sheet before
activating the cell?


John Michl

Find Macro across workbook
 
Sheets("Sheet1").Activate where Sheet1 is the name of the sheet your
are trying to activate. I'm not a VBA expert but it seems redundant
that you have to use the Activate method on the Active Cell. You might
post your message in the microsoft.public.excel.worksheet.programming
forum to get VBA help.

- John



All times are GMT +1. The time now is 07:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com