+ Reply to Thread
Results 1 to 2 of 2

Run Time Error 1004

  1. #1
    Forum Contributor
    Join Date
    04-09-2005
    Location
    Multan. Pakistan
    Posts
    129

    Question Run Time Error 1004

    Dear Friends,

    I would like to show the filtered data in a combobox1. For this i am using
    the following codes.

    Private sub userform_activate()

    Dim tempws As Worksheet
    Set tempws = ThisWorkbook.Worksheets.Add
    tempws.Name = "Temp"
    Sheets("code").Select
    Range("a1:g1").Select
    Selection.AutoFilter
    Selection.AutoFilter
    Selection.AutoFilter field:=4, criterial:="Cotton Suppliers"

    Range("a1:b65531").Select
    Selection.Copy
    Sheets("temp").Select
    Range("a1").Select
    ActiveSheet.Paste

    Sheets("temp").Activate

    comboBox1.columnCount = 1
    ComboBox1.RowSource = Range("b2", range("b2").end(Xldown)).address

    End sub


    But when i run it. It stops at

    selection.AutoFilter field:=4, Criterial:="Cotton Suppliers"

    with a message of run time error 1004.

    How can i overcome the Problem. Further i would like to delete the
    "Temp" Worksheet when close the userForm.

    Thanks

    Syed Haider Ali

  2. #2
    Forum Contributor
    Join Date
    04-09-2005
    Location
    Multan. Pakistan
    Posts
    129

    Question Run Time Error

    Is there any solution?

+ 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