View Single Post
  #16   Report Post  
Posted to microsoft.public.excel.programming
Sandy Sandy is offline
external usenet poster
 
Posts: 270
Default Scroll to selected cell

The Current Round worksheet is the active sheet - it is where the button is.
The message box is a result of clicking the button - if a condition is met.
It is then closed but the D109 selection, which comes after the message box,
does not work.
It's a puzzle!
Sandy


"JLGWhiz" wrote in message
...
Sandy, I tried both types of buttons just to be sure and they both scroll
to
D109 as long as the sheet is active. They did not scroll it to the top of
the window, but they both scrolled it mid screen vertically. I noticed
that
you have a message box displayed. Are you closing the message box before
clicking the button? If not, that could be your problem. Events are
suspended while the message box is displayed.

"Sandy" wrote:

Charlie
The scroll bar scrolls smoothly and rotating the mouse wheel scrolls
smoothly too.

Sandy

"Charlie" wrote in message
...
Not to ask a dumb question, but when you drag the scroll bars does the
sheet
actually scroll or does it just display that useless little yellow
"ToolTip"
that shows the row or column? Then the sheet jumps to that row/column
when
you release the scrollbar? My workbooks go into that state now and
then
and
I'm not sure what causes it, but it may be related.

"Sandy" wrote:

That doesn't work either I'm afraid.



"JLGWhiz" wrote in message
...
You have to Activate, then select to get the scroll effect.

Sheets("Current Round").Activate
Range("D109").Select

But if you want to do something to the cell you can use the other
syntax,
like:

Sheets("Current Round").Range("D109") = "My Cell"

It's a design thing.

"Sandy" wrote:

I have a piece of code on a button on Sheets("Current Round"). The
button
is
at the top of the sheet.

If ******Code******* Then
MsgBox "There are incomplete entries etc"

Sheets("Current Round").Range("D109").Select

Exit Sub
End If

How can I force Cell "D109" not only to be selected but also
visible
in
the
window.

Thanks
Sandy