+ Reply to Thread
Results 1 to 7 of 7

Need help in error '9'

  1. #1
    Registered User
    Join Date
    04-29-2006
    Posts
    68

    Need help in error '9'

    Gentlemen,
    I try to build sorting code, but I face error message '9'

    The code,

    Sub Sort()
    Application.ScreenUpdating = False
    Sheets("PivotTable1").PivotTables("PivotTable1").PivotFields("Emp Name").AutoSort _
    [drpSortMethod].Value, [usSortStat].Value, Sheets("PivotTable1").PivotTables("PivotTable1"). _
    PivotColumnAxis.PivotLines([drpSortStat].Value), 1
    Application.ScreenUpdating = True
    End Sub


    drpSortStat 3
    usSortStat Average of % with team Avg
    drpSortMethod 1
    usSortMethod Ascending
    Attached Images Attached Images

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Need help in error '9'

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    04-29-2006
    Posts
    68

    Re: Need help in error '9'

    Thanks fotis 1991,
    the code is
    Please Login or Register  to view this content.
    I try to change the sheet to pivt, not working too
    See the attached file
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    05-10-2012
    Location
    Paris, France
    MS-Off Ver
    2016/365
    Posts
    123

    Re: Need help in error '9'

    See the réponse in the over post
    http://www.excelforum.com/excel-prog...error-9-a.html


  5. #5
    Registered User
    Join Date
    04-29-2006
    Posts
    68

    Re: Need help in error '9'

    Quote Originally Posted by BrianM45 View Post
    Thanks BrianM45,
    It is not working too
    Regards

  6. #6
    Forum Contributor
    Join Date
    05-10-2012
    Location
    Paris, France
    MS-Off Ver
    2016/365
    Posts
    123

    Lightbulb Re: Need help in error '9'

    Re,

    I don't understand

    Try this workbook with the correct code
    Summary1.xlsm

    A+

  7. #7
    Registered User
    Join Date
    04-29-2006
    Posts
    68

    Re: Need help in error '9'

    Quote Originally Posted by BrianM45 View Post
    Re,

    I don't understand

    Try this workbook with the correct code
    Attachment 273759

    A+
    Thanks BrianM45,

    It is working now

    Regards
    Last edited by migdad; 10-27-2013 at 03:58 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Error " Run-time error '1004': application defined or object defined error
    By lengwer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2013, 07:26 AM
  2. Receiving following error “Complie error : syntax error” Help
    By masond3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2012, 10:19 AM
  3. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  4. Error 75 File/Path access error, sometimes Error 1004
    By smokebreak in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-16-2011, 02:35 PM
  5. Error Handling - On Error GoTo doesn't trap error successfully
    By David in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-16-2006, 02:10 PM

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