Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello Does any one know how to a add a button to the top menu bar.
i.e. running an auto open button which then adds the following butto to run the following code Dim rng As Range Dim rng2 As Range Dim strStart As String Dim strEnd As String GetForm: Sheets("extract").Visible = True Sheets("Purchasing").Select strStart = InputBox("Please enter start date, (dd/mm/yyyy)", "Tur Around checker: Start Date") strEnd = InputBox("Please enter end date, (dd/mm/yyyy)", "Turn Aroun Checker: End Date") Selection.AutoFilter Field:=2, Criteria1:="=" CLng(CDate(strStart)), Operator:=xlAnd, _ Criteria2:="<=" & CLng(CDate(strEnd)) With ActiveSheet.AutoFilter.Range On Error Resume Next Set rng2 = .SpecialCells(xlCellTypeVisible) On Error GoTo 0 End With Worksheets("extract").Cells.Clear Set rng = ActiveSheet.AutoFilter.Range rng.Copy Destination:=Worksheets("extract").Range("A1" -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding a Button | Excel Discussion (Misc queries) | |||
Need help with adding a button to sheet | Excel Programming | |||
Adding ToolTip to a button | Excel Programming | |||
adding button for add-in | Excel Programming | |||
adding button for add-in | Excel Programming |