Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 152
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 152
Default 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
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
View cell contents as a pop-up window (similar to comments window) Oldersox Excel Worksheet Functions 1 February 6th 08 07:09 AM
Multiple-window view hmm Excel Discussion (Misc queries) 7 December 24th 06 03:10 PM
Window Message for not value found maperalia Excel Programming 4 April 20th 06 01:00 AM
Window View inverted haitch2 Excel Discussion (Misc queries) 2 October 10th 05 01:50 PM
3/4 window view mommarosa Excel Discussion (Misc queries) 3 February 11th 05 07:41 PM


All times are GMT +1. The time now is 02:54 AM.

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

About Us

"It's about Microsoft Excel"