Consulting

Results 1 to 3 of 3

Thread: Need help with Macro's and Userforms. :)

  1. #1

    Question Need help with Macro's and Userforms. :)

    Hey everyone, first time posting. 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.


    Prophet

  2. #2
    Moderator VBAX Mentor sheeeng's Avatar
    Joined
    May 2005
    Location
    Kuala Lumpur
    Posts
    392
    Location
    Welcome to VBA Express!

    Can you show us your sample file?

    Thx in advance.

  3. #3
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •