Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Found Data Not in Window View
I can successfully find Data in a Pivot table Worksheet called "Pivot" using
this code: wsPivot.Activate wsPivot.Columns("C:C").Select Dim FirstFound As Object Set FirstFound = Selection.Find(What:=SearchIND_ID, After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False) If Not FirstFound Is Nothing Then 'MsgBox ("The first location found on Pivot Sheet is:" & FirstFound.Address) wsPivot.Range(FirstFound.Address).Select 'Application.Goto Reference:=wsPivot.Range(FirstFound.Address) Else 'MsgBox ("Nothing was found") wsGE.Activate End If The problem is that if the found/select range is in row 3,267, I must scroll down 3,267 row to view the .Active (found cell). How can I get the found record into the current window view so that I don't have to scroll to it? Many Thanks Ross |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Found Data Not in Window View
The Application.Goto command that you commented out didn't do it for you?
-- Rick (MVP - Excel) "Ross" wrote in message ... I can successfully find Data in a Pivot table Worksheet called "Pivot" using this code: wsPivot.Activate wsPivot.Columns("C:C").Select Dim FirstFound As Object Set FirstFound = Selection.Find(What:=SearchIND_ID, After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False) If Not FirstFound Is Nothing Then 'MsgBox ("The first location found on Pivot Sheet is:" & FirstFound.Address) wsPivot.Range(FirstFound.Address).Select 'Application.Goto Reference:=wsPivot.Range(FirstFound.Address) Else 'MsgBox ("Nothing was found") wsGE.Activate End If The problem is that if the found/select range is in row 3,267, I must scroll down 3,267 row to view the .Active (found cell). How can I get the found record into the current window view so that I don't have to scroll to it? Many Thanks Ross |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Found Data Not in Window View
The GOTO code worked identically to the find code.
I removed some other code that was part of code used to populate the A1 lookup cell in the Pivot worksheet. It was (that I removed): 'Application.ScreenUpdating = False 'Application.ScreenUpdating = True When I removed this which was not necessary, the .find code began working properly. It fixed my problem and now things are working as they should. Thanks Rick "Rick Rothstein" wrote: The Application.Goto command that you commented out didn't do it for you? -- Rick (MVP - Excel) "Ross" wrote in message ... I can successfully find Data in a Pivot table Worksheet called "Pivot" using this code: wsPivot.Activate wsPivot.Columns("C:C").Select Dim FirstFound As Object Set FirstFound = Selection.Find(What:=SearchIND_ID, After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=False) If Not FirstFound Is Nothing Then 'MsgBox ("The first location found on Pivot Sheet is:" & FirstFound.Address) wsPivot.Range(FirstFound.Address).Select 'Application.Goto Reference:=wsPivot.Range(FirstFound.Address) Else 'MsgBox ("Nothing was found") wsGE.Activate End If The problem is that if the found/select range is in row 3,267, I must scroll down 3,267 row to view the .Active (found cell). How can I get the found record into the current window view so that I don't have to scroll to it? Many Thanks Ross |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
View cell contents as a pop-up window (similar to comments window) | Excel Worksheet Functions | |||
Multiple-window view | Excel Discussion (Misc queries) | |||
Window Message for not value found | Excel Programming | |||
Window View inverted | Excel Discussion (Misc queries) | |||
3/4 window view | Excel Discussion (Misc queries) |