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

Yes I get the message box, just doesn't want to goto cell D109. I am
beginning to think it is a piece of code elsewhere that is affecting the
outcome.

It's not the end of the world I can live without it doing the goto.

Thanks for all efforts.
Sandy


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Sandy,

It works for me - I took out the line

If EmptyRng(Sheets("Current Round").Range("D109,C111:C111,C114:K114"))
Then

Do you get the Msgbox "There are incomplete...."?

HTH,
Bernie
MS Excel MVP


"Sandy" wrote in message
...
Tried your suggestion Bernie - but no joy.
The button is on ("Current Round").

I have put complete code on button below :-

Sub InsertHomePar()

If EmptyRng(Sheets("Current Round").Range("D109,C111:C111,C114:K114"))
Then

MsgBox "There are incomplete entries" _
& vbCrLf & _
"in the Home Par section"

Application.GoTo Sheets("Current Round").Range("D109"), True

Exit Sub
End If


Sheets("Current Round").Unprotect Password:="pinev85"

Application.ScreenUpdating = False
Application.EnableEvents = False


Sheets("Current Round").Range("C14:K14").Value = Sheets("Current
Round").Range("C111:K111").Value
Sheets("Current Round").Range("C20:K20").Value = Sheets("Current
round").Range("C114:K114").Value
Sheets("Current Round").Range("H3").Value = Sheets("Current
round").Range("D109").Value

Application.ScreenUpdating = True
Application.EnableEvents = True

Sheets("Current Round").Protect Password:="pinev85"


End Sub

"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Sandy,

As long as Current Round is the activesheet:

Application.Goto Sheets("Current Round").Range("D109"), True

HTH,
Bernie
MS Excel MVP


"Sandy" wrote in message
...
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