View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Sheeloo[_3_] Sheeloo[_3_] is offline
external usenet poster
 
Posts: 1,805
Default Custom Filter in a Macro

1. Search Help for INPUTBOX

Following is the example from Help
Dim Message, Title, Default, MyValue
Message = "Enter a value between 1 and 3" ' Set prompt.
Title = "InputBox Demo" ' Set title.
Default = "1" ' Set default.
' Display message, title, and default value.
MyValue = InputBox(Message, Title, Default)

' Use Helpfile and context. The Help button is added automatically.
MyValue = InputBox(Message, Title, , , , "DEMO.HLP", 10)

' Display dialog box at position 100, 100.
MyValue = InputBox(Message, Title, Default, 100, 100)

2. You can set the print area through code like the example below (again
from Help);
ActiveSheet.PageSetup.PrintArea = _
ActiveCell.CurrentRegion.Address

"Mike The Newb" wrote:

I would like the Macro to prompt the user for what they want to see within
the filter; the user input will vary. What's the "prompt user" code?

Another question - I want to print the results which could vary in number of
rows - can a Macro accommodate that? How so?

Thank you in advance for your time and consideration.

Regards,
Mike