+ Reply to Thread
Results 1 to 5 of 5

Run-time error 1004 - Method 'Range' of object'_Global' failed

  1. #1
    Forum Contributor onmyway's Avatar
    Join Date
    09-03-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2013
    Posts
    386

    Run-time error 1004 - Method 'Range' of object'_Global' failed

    Hi guys, would really appreciate your help!

    How can I change this section of code for my search function, to show a msgBox with YES and NO option to create a new record when my ListBox3 is empty when searching, i.e., it finds no possible match?

    Please Login or Register  to view this content.
    Normally, I would simply create a new record on the UserForm without using the search function, but since I have the search function there is an error when I click my Save Entry button: Run-time error 1004 - Method 'Range' of object'_Global' failed.

    I am sure the issue lies in this: my module3 has code specifying a range, and my Save Entry button has code for a range....

    I would like to use both features of creating records....

    Thanks for all help!
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Run-time error 1004 - Method 'Range' of object'_Global' failed

    Hi..

    Change the following Sub to:
    Please Login or Register  to view this content.
    And as for the error.. it was error because iRow was not getting passed a Value because no Autofilter had taken place (thereby it was bypassing the code in the FirstVisibleValue Function)..

    Change the first part of your btnSave_Click Sub to this.. that should fix that...
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor onmyway's Avatar
    Join Date
    09-03-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2013
    Posts
    386

    Re: Run-time error 1004 - Method 'Range' of object'_Global' failed

    apo - you rock! Thanks for the help - works great!

  4. #4
    Valued Forum Contributor
    Join Date
    03-22-2013
    Location
    Australia,NSW, Wirrimbi
    MS-Off Ver
    Excel 2013
    Posts
    1,057

    Re: Run-time error 1004 - Method 'Range' of object'_Global' failed

    Hey.. Thats great it works for you... btw.. the Wallabies rule!

  5. #5
    Forum Contributor onmyway's Avatar
    Join Date
    09-03-2012
    Location
    Johannesburg, South Africa
    MS-Off Ver
    2013
    Posts
    386

    Re: Run-time error 1004 - Method 'Range' of object'_Global' failed

    Yes, bud... As an avid Springbok supporter, I might not share your sentiment for the Wallabies, but as a friend a feel sorry for the proper ***-whipping the Allblacks gave you today.... C u when we play u

+ 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. Run-time error '1004'. Method 'Range' of object '_Global' failed
    By mjj347 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-24-2012, 11:09 AM
  2. Run-time-error 1004 -- Method 'Range' of object '_Global' failed
    By tilleyd in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-04-2012, 10:55 PM
  3. Run-Time Error 1004 Method Range of object _Global Failed?
    By MadDino in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-11-2011, 05:13 AM
  4. Run-time error '1004': Method 'Range' of object '_Global' failed
    By claremount in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-26-2010, 08:01 AM
  5. Run time error 1004 - Method 'Range' of 'Object'_Global' failed
    By excelaspire0219 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-10-2009, 01:18 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