Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Peeps,
What i want to to do is have a list to select from. I use a input bo for monthly outputs where you type the actuall month. Instead of doin this i want a list box so that you just clcik on the month then ok. Th code am using is as follows: Dim rng As Range Dim rng2 As Range Dim strMONTH As String strMONTH = Application.InputBox("Please Select the month you wish t compare.", "Monthly Output") Selection.AutoFilter Field:=10, _ Criteria1:="=" & (strMONTH) With ActiveSheet.AutoFilter.Range On Error Resume Next Set rng2 = .SpecialCells(xlCellTypeVisible) On Error GoTo 0 End With If rng2 Is Nothing Then MsgBox "No info for that month" Else Worksheets("Monthly Output").Cells.Clear Set rng = ActiveSheet.AutoFilter.Range rng.Copy Destination:=Worksheets("Monthly Output").Range("A1") End If ActiveSheet.ShowAllDat -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to get cell input to access list? | New Users to Excel | |||
Input Range for a List Box | Excel Worksheet Functions | |||
List Box Input to query | Excel Discussion (Misc queries) | |||
Input Box Drop-Down List | Excel Programming | |||
Access AutoFilter list for use with input box? | Excel Programming |