+ Reply to Thread
Results 1 to 7 of 7

Search sheet and display results

Hybrid View

  1. #1
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606
    Do you mean you want sheet2 to revert to "Sheet2"? If so, try this:
    Private Sub CommandButton1_Click()
        
        Dim ManufacturerNum
        Dim Details As Double
        ManufacturerNum = InputBox("Enter the manufacturer")
        If ManufacturerNum = Cancel Then
            Sheet2.Name = "Sheet2"
            Exit Sub
        End If
        With Sheets("List")
            Sheet2.UsedRange.Clear
            .AutoFilterMode = False
            .Range("A1").AutoFilter field:=1, Criteria1:=ManufacturerNum
            .AutoFilter.Range.Copy Sheet2.Range("A1")
            .AutoFilterMode = False
        End With
        Sheet2.Name = ManufacturerNum
        
    End Sub

  2. #2
    Forum Contributor
    Join Date
    06-18-2008
    Posts
    123
    Problem solved! Thanks for all your help mate

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1