+ Reply to Thread
Results 1 to 16 of 16

Global Fail

  1. #1
    Registered User
    Join Date
    01-27-2009
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    54

    Global Fail

    Hi I've been working on this code and now I'm stuck. Hoping anyone can help me out cleaning up and or fixing errors.
    This line
    Please Login or Register  to view this content.
    I receive runtime 1004 method range of object worksheet fail

    Thanks in advance!

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,823

    Re: Global Fail

    Try:
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: Global Fail

    Alternately
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-27-2009
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Global Fail

    Quote Originally Posted by Fluff13 View Post
    Alternately
    Please Login or Register  to view this content.
    this would in a sense just populate all the cell with the function?
    the populated cells would still check the value in column A* correct?

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: Global Fail

    Yes that's right, it's doing exactly what your code is trying to do.

  6. #6
    Registered User
    Join Date
    01-27-2009
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Global Fail

    Thank you I actually will use this since it reduces code

    however I'm still getting the global fail error
    Please Login or Register  to view this content.

  7. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: Global Fail

    Have a look at that line & compare it to the line above where it inserts the formula.
    See the difference between how the ranges are laid out?

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,488

    Re: Global Fail

    Look at the line of code above it and make similar changes.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  9. #9
    Registered User
    Join Date
    01-27-2009
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Global Fail

    Quote Originally Posted by k2hunter View Post
    Thank you I actually will use this since it reduces code

    however I'm still getting the global fail error
    Please Login or Register  to view this content.
    OK yes I changed the formatte of how it was coded and it runs with out error on the lines I've changed.
    I hate to keep posting for each error however is it only syntax or did I declare incorrectly? since now the error is on
    Please Login or Register  to view this content.

  10. #10
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: Global Fail

    You cannot select a cell on a non-active sheet.
    What are you trying to copy & where do you want to paste it?

  11. #11
    Registered User
    Join Date
    01-27-2009
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Global Fail

    the functions will run on WS2
    then be copied and pasted to WS1 as text this might be excessive but I'm trying to avoid running the macro after each execution.

  12. #12
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: Global Fail

    How about
    Please Login or Register  to view this content.

  13. #13
    Registered User
    Join Date
    01-27-2009
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Global Fail

    ok thanks yes that seems to be working. I appreciate the time

    just out of curiosity is there a way to have the macro run only when the "button" is clicked and not every time an entry is executed on the workbook? I tried to change the options for automatic to manual but then the macro wont even run.

  14. #14
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: Global Fail

    How are you trying to run the macro?
    That is not an Event code, so it should not be running automatically, unless you are calling it from another code.

  15. #15
    Registered User
    Join Date
    01-27-2009
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    54

    Re: Global Fail

    on WS1 I have a button to run the script on WS2. however if I enter a new value such as adding a new link to check it runs the whole macro again. once I push enter

  16. #16
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,097

    Re: Global Fail

    If the code is assigned to a button, it should only run when you click the button.

+ 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. IF not over a certain% than Fail
    By jklangenberg in forum Excel General
    Replies: 3
    Last Post: 09-27-2017, 12:50 PM
  2. How to make a cell display "FAIL" when range of cells is FAIL
    By crazychile in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-18-2017, 04:13 PM
  3. [SOLVED] Need a formula for pass/fail based on no. of Y answers but automatically fail if 3a is N
    By Researcher1111 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-15-2013, 10:20 PM
  4. [SOLVED] Range of Method Object Global Fail
    By jlax34 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-18-2012, 01:50 PM
  5. Replies: 5
    Last Post: 11-28-2005, 08:25 PM
  6. why does this fail?
    By Gixxer_J_97 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-18-2005, 08:06 AM
  7. How to get DirectoryTree in *.xls fail ?
    By separator in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-23-2005, 11:03 AM

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