+ Reply to Thread
Results 1 to 3 of 3

Receiving Application defined or object defined error

  1. #1
    Forum Contributor
    Join Date
    04-11-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    245

    Receiving Application defined or object defined error

    Hi -

    Working on building one of my first apps and am running into a 1004 error..."Application Defined or Object Defined error". I have no idea why this happening or what I need to do to fix it. I've attached my workbook. Try the following steps to see the issue:

    1) When you open the workbook click on 'Begin a New Event'
    2) Another user form appears... type in an Event Name and click 'Create Event' button. This action should automatically unload the current form and open the next form which frm3TeamPlayData. Instead, I receive the 1004 error (see code below). Any help with this, including a brief explanation of what is causing this error and how to avoid it in the future, would be greatly appreciated.

    Thank you!

    Grilleman

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,935

    Re: Receiving Application defined or object defined error

    The issue is at your UserForm_initialize code for frm3TeamPlayData.

    Change the last line of your code to something like...
    Please Login or Register  to view this content.
    Issue occurs because you use LstRw in initialize event, but no code to define/set it.


    EDIT:
    FYI - to debug Userform code. It's easier if you set Tools->Options->General tab -> Error Trapping section to "Break in Class Module". In VBE.
    This will allow debugger to highlight line of code that generates error within UserForm code.
    Last edited by CK76; 10-17-2019 at 10:43 AM.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

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

    Re: Receiving Application defined or object defined error

    In the VB Editor, select Tools > Options > General > check "Break in class module" > OK
    Then try your forms again. This time you will be able to click debug & it will take you to the problem line in the Frm3 code.

+ 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] Keep receiving Run-time error '1004': Application-defined or object-defined error
    By BladeAP in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-23-2014, 04:24 PM
  2. Replies: 1
    Last Post: 05-08-2014, 04:57 AM
  3. Previously working code is now is now giving Application-defined or object-defined error
    By ready2learn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-06-2014, 07:22 PM
  4. [SOLVED] application-defined/object-defined error 1004 when trying to read from or write to cells
    By florin_excel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2012, 08:38 AM
  5. Replies: 2
    Last Post: 09-12-2012, 01:01 PM
  6. Application Defined or Object Defined Error, Command Button and Vlookup Function
    By stevedomer in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-14-2011, 11:20 PM
  7. Replies: 3
    Last Post: 07-24-2006, 08:20 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