What is the difference between 'Select' a sheet and 'Activate' a sheet
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
But if this is for general usage, and not just personal usage, you
might find you have better control by having the data input on a user
form instead of directly on the sheet. You can probably make it look
better, also.
|