So I would like to automatically run an auto filter when a wb opens. and this code does, but I would like the main screen not displayed. this code hides both the xls and the input box.
Any ideas on how to only view the input box?
Private Sub Workbook_Open()
'Setview
Application.WindowState = xlMinimized
Range("A2").AutoFilter 1, InputBox("Please Enter Site #")
i = Cells(1, 1).End(xlToRight).Column
Application.ScreenUpdating = False
For Each c In Range(Cells(1, 1), Cells(1, i))
If c.Column <> 1 Then
c.AutoFilter Field:=c.Column, _
Visibledropdown:=False
End If
Next
End Sub
Any ideas on how to only view the input box?
Private Sub Workbook_Open()
'Setview
Application.WindowState = xlMinimized
Range("A2").AutoFilter 1, InputBox("Please Enter Site #")
i = Cells(1, 1).End(xlToRight).Column
Application.ScreenUpdating = False
For Each c In Range(Cells(1, 1), Cells(1, i))
If c.Column <> 1 Then
c.AutoFilter Field:=c.Column, _
Visibledropdown:=False
End If
Next
End Sub