Results 1 to 30 of 30

Button click, cut and paste into another spreadsheet data that was filtered

Threaded View

  1. #1
    Valued Forum Contributor marreco's Avatar
    Join Date
    07-02-2011
    Location
    Brazil
    MS-Off Ver
    Excel 2010
    Posts
    1,862

    Button click, cut and paste into another spreadsheet data that was filtered

    Hi.

    I have a code to filter data by an ActiveX textbox.
    works well, but need a adatção.

    I would use a button that when clicked, the line would be filtered cut and pasted into another tab.


    Big File in: http://www.sendspace.com/file/nis5zh
    Private Sub TextBox1_LostFocus()
         FilterNow
    End Sub
    Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
         If KeyCode = Asc(vbCr) Then
             FilterNow
             Range("A1").Select
         End If
    End Sub
    Private Sub FilterNow()
         If Trim(TextBox1.Value) > vbNullString Then
             Range("A1").CurrentRegion.AutoFilter Field:=4, Criteria1:=TextBox1.Value
         ElseIf ActiveSheet.AutoFilterMode Then
             Range("A1").CurrentRegion.AutoFilter
         End If
    End Sub
    thank you!
    Last edited by marreco; 10-14-2012 at 08:11 PM.
    "No xadrez nem sempre a menor dist?ncia entre dois pontos ? uma linha reta" G. Kasparov.

    If your problem is solved, please say so clearly, and mark your thread as Solved: Click the Edit button on your first post in the thread, Click Go Advanced, select b from the Prefix dropdown, then click Save Changes. If more than two days have elapsed, the Edit button will not appear -- ask a moderator to mark it.

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