View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
noyb noyb is offline
external usenet poster
 
Posts: 7
Default Home or Ctrl-Home

Actually don't want to select anything, just want to position cursor at
top of sheet, taking into consideration frozen panes.
Thanks

Norman Jones wrote:
Hi Noyb,

Try:

ActiveCell.EntireRow.Cells(1).Select

Cells(1).Select

However, using VBA, it is rarely necessary to make selections and it is
frequently inefficient to do so.

Noramally, a better approach would be to set the required cell to a range
variable and manipulate the variable, e.g:

Dim Rng as Range

Set Rng = ActiveCell.EntireRow.Cells(1)
Rng.Interior.ColorIndex = 6

---
Regards,
Norman



"noyb" wrote in message
...

Please tell me the VBA code for these keystrokes
Thanks