+ Reply to Thread
Results 1 to 5 of 5

Code generates 400 error

  1. #1
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    811

    Code generates 400 error

    The code below is an attempt to convert all the cells on the active sheet from formula (where they exist) into values. It generates a 400 error at ws.Select so I have obviously failed to specify something. Any help much appreciated.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,199

    Re: Code generates 400 error

    Hi, BRISBANEBOB,

    maybe
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,794

    Re: Code generates 400 error

    Perhaps a slightly different approach?

    Please Login or Register  to view this content.
    Alf

  4. #4
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 365 on Win11 (desktop), 2019 on Win11 (notebook)
    Posts
    8,199

    Re: Code generates 400 error

    Hi, Alf,

    as long as no other sheet except for worksheets is in the workbook it´s okay to use Sheets but I´d prefer to use Worksheets here.
    Please Login or Register  to view this content.
    Point with this approach might be the size of the used range which may slow down the process if a lot of data is in the sheets.

    Ciao,
    Holger

  5. #5
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,794

    Re: Code generates 400 error

    Hi Holger

    The "Worksheet" re "Sheet" count is a valid point I've not considered thanks for that. As for the speed well a lot of data will slow down all macros more or less but in this case the OP has two possible solutions to choose from.

    Alf

  6. #6
    Forum Contributor
    Join Date
    12-02-2008
    Location
    Brisbane
    MS-Off Ver
    2016
    Posts
    811

    Re: Code generates 400 error

    Thanks for that Fellows - worked a treat

+ 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. Range Select generates 400 error code
    By BRISBANEBOB in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-17-2013, 02:26 AM
  2. VBA generates error 13
    By jmafabi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2012, 11:04 AM
  3. Trying to use method to find but generates error
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-23-2012, 06:20 PM
  4. Setting AutoFilter via VBA generates error?
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2010, 10:38 AM
  5. Macro generates error '5'
    By Rick_Stanich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-18-2009, 04:17 PM

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