PDA

View Full Version : Sleeper: Need help with Macro's and Userforms. :)



prophet
07-05-2005, 09:13 AM
Hey everyone, first time posting. :hi: I recently created a Incident/Accident report for the company I work for. I have macros to sort and display data based upon user-defined criteria and also to clear the sheet when they want to start a new search. I want to make this look semi-professional so I was wondering how I would go about displaying the data in a userform text box? The form would have the company name up top and two buttons ( one for "print" and one for "new search") below that. Then below everything else the text box would show the data that that macro came up with. Any help is greatly appreciated. : pray2:


Prophet

sheeeng
07-05-2005, 09:26 AM
Welcome to VBA Express!

Can you show us your sample file?

Thx in advance.

prophet
07-05-2005, 09:54 AM
Hey, thanks for the reply. Originally the data would be displayed just below the criteria field. Here's the macro code:


Sub Sorter()
Range("Form!E5").Select
Range("Data!A1: Data!I299").AdvancedFilter Action:=xlFilterCopy, CriteriaRange:=Range( _
"Form!A4:Form!I5"), CopyToRange:=Range("Form!A7:Form!I7"), Unique:=False
End Sub

The data is on one sheet and the form for displaying is on another. Thanks again.


Prophet