+ Reply to Thread
Results 1 to 9 of 9

Runtime error 1004 application defined or object defined error

  1. #1
    Registered User
    Join Date
    01-18-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    28

    Runtime error 1004 application defined or object defined error

    I have tried everything I think.

    I am using a workbook open event to start two different Inputboxes to change a cell that activates a worksheet change event and then runs a set of several inputboxes.

    When I run the Open event I get the above error on the second macro.

    Currently the code is simple. Each macro after these runs seperately and together. This is the only hiccup and it was working fine but something changed.

    I have tried it everywhich way and got a different Run time 1004 that said some thing about not finding the macro.

    I am also new to VBA but learning very quickly, any help would be great.

    Please Login or Register  to view this content.
    Last edited by Wyliecody; 02-02-2012 at 07:08 PM.

  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
    47,522

    Re: Runtime error 1004 application defined or object defined error

    Please post the workbook with the full code.

    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
    Registered User
    Join Date
    01-18-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Runtime error 1004 application defined or object defined error

    BoilerCalctooltest.xlsm

    Its huge but here you go.

  4. #4
    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
    47,522

    Re: Runtime error 1004 application defined or object defined error

    Change the name of the module from Tower_Number to just TowerNumber.


    You can't/shouldn't have a module and a subroutine/function with the same name.

    I think you'd be far better off with a User Form and ask all the questions at once and then validate that you have all the information you need. But that's a different story.

    Regards, TMS

  5. #5
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    Re: Runtime error 1004 application defined or object defined error

    I have to agree with TMS, the workbook is highly annoying having constant pop ups, just one userform would suffice, you can always add error handling to check if someone has left a box empty where you require a value


    Google Me
    Find me located here Simon Lloyd
    and what i'm about Here
    The above is NOT a link to a forum so is NOT against Rule 13
    Last edited by Simon Lloyd; 02-03-2012 at 12:38 PM.

  6. #6
    Registered User
    Join Date
    01-18-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Runtime error 1004 application defined or object defined error

    that was simple. It worked. I do have some method behind my madness. The thought process is User ease of use from a tablet. That way it can be punched in simply and quickly and then get a price. However, still being new to this I am curious about what you are suggesting. A userform meaning what? the only userform I have used is a Button to calculate all the info. That still requires an extra step. I want it a idiot proof as possible, You think a user form could do that?

  7. #7
    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
    47,522

    Re: Runtime error 1004 application defined or object defined error

    You're welcome. Thanks for the rep.

    You're using code already. I assume, but I could easily be wrong, that if the existing code works on a tablet, then a user form would.

    Under normal circumstances, I would think a form would be the best way. You'd have a label for each field with a description and a text box for each field. Then you'd have two buttons, process and cancel. If process is pressed, you can validate all the data fields. That's the theory, anyway.

    Regards, TMS

  8. #8
    Registered User
    Join Date
    01-18-2012
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    28

    Re: Runtime error 1004 application defined or object defined error

    Thanks for the suggestion. I will play with it and see what I can do. thanks.

  9. #9
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    Re: Runtime error 1004 application defined or object defined error

    Here's a littel example userform to show you that you can fit lots of information on and manipulate it


    Google Me
    Find me located here Simon Lloyd
    and what i'm about Here
    The above is NOT a link to a forum so is NOT against Rule 13
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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