What is the difference between 'Select' a sheet and 'Activate' a sheet
On Oct 29, 12:23*pm, Ron Rosenfeld wrote:
On Thu, 28 Oct 2010 20:52:07 -0700 (PDT), Pat Quatman
wrote:
Rather than
' This is what I had been doing that seemed to cause the problem - a
snippet for sample purposes of course.
Sub PickAPage ()
* * ThisWorkbook.Worksheets("Consolidation").Select
* * * * *Range("z9").Activate
End Sub
' -------------------------
or
This was my first attempt at a solution, which seemed to work at the
moment anyway - not sure about the long term though
Sub PickAPage ()
* * ThisWorkbook.Worksheets("Consolidation").Activate
* * * * Range("z9").Activate
End Sub
I don't understand why your first example should have been causing
problems, unless perhaps the worksheet was not a a worksheet, but
rather a chart sheet.
For data input, I would
* * * * select the proper worksheet
* * * * activate the cell
* * * * scroll the cell to the top left corner.
e.g:
*With Worksheets("sheet2")
* * * * .Select
* * * * .Range("z9").Activate
* * End With
* * Application.Goto ActiveCell, scroll:=True
Why not just use this?
Application.Goto Worksheets("Sheet2").Range("Z9"), Scroll:= True
A workbook reference can be added too in case there is more than
workbook open.
|