+ Reply to Thread
Results 1 to 5 of 5

Getting run-time error 1004

  1. #1
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Getting run-time error 1004

    Hi friends,

    Getting run-time error 1004

    If user delete a district in cell P6 then I want to exit the sub. I’m getting error here.

    I want to create a list of blocks in column ‘P’ after selecting a district in cell ‘P6’ dropdown list for districts.
    After selecting a district I run a macro ‘block’ to get a list of blocks.

    I’m getting run-time error after running a block macro.

    Any help will be highly appreciated.

    Thanking you,
    Attached Files Attached Files
    Last edited by mso3; 07-24-2015 at 09:57 AM. Reason: Change title
    Sincerely,

    mso3

  2. #2
    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,430

    Re: Getting compile error 1004

    Two problems: 1) if the wrong sheet is selected LR isn't set correctly and the cell content may be blank, and 2) if the right sheet is selected, the data (Mumbai city) contains a space. You can't have a space in a Named Range and, in fact, the Named Range has an underscore in it.

    so, this will correct the second problem. I'll leave you to ensure the right sheet/data is selected.

    Please Login or Register  to view this content.

    Regards, TMS
    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


  3. #3
    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,430

    Re: Getting compile error 1004

    Actually, the thread title is a little misleading as it's a run-time error rather than a compile error.

    Regards, TMS

  4. #4
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Getting compile error 1004

    Hi TMS,

    Greetings from me!

    Perfect solution.

    I by heart appreciated you for working on my problem since last two days. The problem was of _ only which you solved now.

    Thank you and have a nice time.

  5. #5
    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,430

    Re: Getting run-time error 1004

    You're welcome. Thanks for the rep.

+ 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] Getting compile error 1004
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-14-2015, 10:37 PM
  2. [SOLVED] Getting compile error 1004 auto fill method fail
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2015, 12:05 AM
  3. [SOLVED] Getting compile error 1004
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-03-2015, 07:49 PM
  4. [SOLVED] Getting compile error 1004 unable to set the hidden property of range class
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-09-2015, 10:21 AM
  5. Getting compile error 1004 class method fail
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2015, 11:34 PM
  6. [SOLVED] Getting compile error 1004
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-16-2015, 06:46 PM
  7. Compile error 1004
    By mukeshbaviskar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-08-2014, 10:35 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