Results 1 to 4 of 4

Vba errors 400 and 1004

Threaded View

  1. #1
    Registered User
    Join Date
    06-13-2011
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    24

    Vba errors 400 and 1004

    Hi,

    Grateful if anyone can help.

    I have a worksheet called "Front" which contains a bunch of named ranges and a couple of macro buttons.

    Behind it is a sheet called "List" which contains an autofiltered table.

    One of the macros on "Front" is to reset the options and clear the autofilter on "List". Code below. It sometimes works. Sometimes I get an error that just says "400". Sometimes, if I run it from the VBA window, I get a runtime 1004 error.

    What am I doing wrong?

    Thanks,

    HE.


    Sub showall()
    
    Worksheets("Front").Range("Option_att_flag").Value = "Any"
    Worksheets("Front").Range("option_gender").Value = "Any"
    Worksheets("Front").Range("option_cic").Value = "Any"
    Worksheets("Front").Range("option_SenLevel").Value = "Any"
    Worksheets("List").ShowAllData
    
    End Sub
    Last edited by headexperiment; 06-13-2011 at 07:37 AM. Reason: add code tags for newbie pm rule

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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