tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,210
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi Everyone,
I want to create a macro that asks the peson to insert tow amounts into a messagebox or any kind of popup box then filters by this?
I know how to use userforms so that would do me fine.
I currently use this
so the message box can put the values into F14 & F15 or just use them
please help if you can
Thanks
Tony
I want to create a macro that asks the peson to insert tow amounts into a messagebox or any kind of popup box then filters by this?
I know how to use userforms so that would do me fine.
I currently use this
Code:
Sub Filterby1()
Sheets("Master").Unprotect 'Password:="august"
sDate = Sheets("Master").Range("F14")
EDate = Sheets("Master").Range("F15")
Sheets("Master").Range("C19:BD19").AutoFilter
Sheets("Master").Range("C19:BD2504").AutoFilter Field:=1, Criteria1:=">=" & sDate, Operator:=xlAnd, Criteria2:="<=" & EDate
Sheets("Master").Protect 'Password:="august"
End Sub
so the message box can put the values into F14 & F15 or just use them
please help if you can
Thanks
Tony