Thread: Go To Home
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
TONYC[_2_] TONYC[_2_] is offline
external usenet poster
 
Posts: 1
Default Go To Home

I would like to be able to go to the top of a worksheet after running
macro which has selecting criteria via an autofilter.

I can obvioulsy mannualy enter Ctrl + Home, but I want to include thi
in a macro. Recording this funcion shows a specific cell reference.

Freeze pane is also active so selecting a cell above the autofilte
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. I
this possible?

This is my macro...


Sub EnterDept()

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

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