Thread: Go To Home
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Go To Home

Tony,

Use Application.Goto. E.g.,

Application.Goto Range("A1"), True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




"TONYC " wrote in message
...
I would like to be able to go to the top of a worksheet after

running a
macro which has selecting criteria via an autofilter.

I can obvioulsy mannualy enter Ctrl + Home, but I want to

include this
in a macro. Recording this funcion shows a specific cell

reference.

Freeze pane is also active so selecting a cell above the

autofilter
range does not show data from the top. (I attempted to add

Cell 'A4',
as shown below). A command for Ctrl + Home would be much

bettter. Is
this possible?

This is my macro...


Sub EnterDept()

Range("C3").Value = InputBox("Please Enter Business Unit", "All
Risks")
Selection.AutoFilter Field:=1, Criteria1:=Range("C3").Value
If Range("C3") = "" Then ActiveSheet.ShowAllData
Range("A4").Select
End Sub


---
Message posted from http://www.ExcelForum.com/