Ask user for input during marco
I create a marco for user to run a report for display any site with inventory
less than 15%, but user want to define the percentage for the site. I was
able to define the box for the user input. How can I use the value to excute
the marco? Here is the marco code:
Sub test1()
'
' test1 Macro
' Macro recorded 11/16/2005 by County of Orange
'
' Keyboard Shortcut: Ctrl+Shift+A
'
'Get target value from user
Message = "Change values less than or equal to ..."
Target = InputBox(Message)
Target = Val(Target)
Selection.AutoFilter
Selection.AutoFilter Field:=2, Criteria1:="<=15%", Operator:=xlAnd
End Sub
Thanks
|