Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #12  
Old 10-16-2014, 04:32 PM
mike12 mike12 is offline On Click do a search of its contents on sheet2 Windows 7 64bit On Click do a search of its contents on sheet2 Office 2013
Novice
On Click do a search of its contents on sheet2
 
Join Date: Oct 2014
Location: Brisbane , Australia
Posts: 10
mike12 is on a distinguished road
Default

Solved though i use a command button with the embedded macro :
ok so i searched other forum and came up with answer.
Below is the code attached to a command button,

Sub FindCellContent()
Dim Sh As Worksheet, foundCell As Range

'Search for CellContent in all Visible Worksheets
For Each Sh In ActiveWorkbook.Worksheets

If Sh.Visible = xlSheetVisible Then
'If you want to ignore the active sheet unmark the below line
'If ActiveSheet.Name <> Sh.Name Then
Set foundCell = Sh.Cells.Find(What:=ActiveCell, _
After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, _
SearchOrder:=xlByRows, SearchDirection:=xlNext)

If Not foundCell Is Nothing Then
If foundCell.Address(External:=True) <> _
ActiveCell.Address(External:=True) Then _
Application.Goto foundCell: Exit For
End If

'/If you want to ignore the active sheet
'End If
End If
Next
If foundCell Is Nothing Then _
MsgBox ActiveCell & " not found in this workbook"

End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
On Click do a search of its contents on sheet2 Hyperlink object - change ctrl+click to click? ld2x07 Word 5 10-10-2014 05:13 AM
Transferring info from 1column on sheet2 to sheet1 rogcar75 Excel 22 08-26-2014 05:07 PM
IE automation: How to auto-click the first link on the search query page? tinfanide Excel Programming 0 05-30-2012 11:02 PM
On Click do a search of its contents on sheet2 How to merge two cells from sheet1 to one cell in sheet2 in next sheet KIM SOLIS Excel 6 10-30-2011 11:14 PM
On Click do a search of its contents on sheet2 Checking ref # status based on sheet2 ref #. aligahk06 Excel 1 04-26-2010 11:22 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft