+ Reply to Thread
Results 1 to 5 of 5

How do i fix "Run-time error "1004" Application-defined or object-defined error"

  1. #1
    Registered User
    Join Date
    11-10-2015
    Location
    Orlando, FL
    MS-Off Ver
    Windows and MAC
    Posts
    3

    How do i fix "Run-time error "1004" Application-defined or object-defined error"

    Hello everyone, my name is enrique and i have come to a problem while trying to modify a VBA to give me specific information. When i run the VBA it gives me the error - "run-time error "1004": Application-defined or object-defined error". How can i fix this issue. I am trying to develop a VBA that will give me all permutations possible, up to 3 variables. The original VBA that i have that works gives your permutations up to six variables. Ive gotten this far on the VBA, if anyone could help fix it or point me in the right direction would be great. Ive been reading on how to fix it but I still get the same error.
    This is the VBA on working on

    Please Login or Register  to view this content.
    The highlighted part is where it says the error is happening
    Last edited by 02Dade12; 11-13-2015 at 07:11 PM. Reason: Broke Forum Rules

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,688

    Re: How do i fix "Run-time error "1004" Application-defined or object-defined error"

    code tags applied
    Last edited by protonLeah; 11-13-2015 at 08:27 PM.
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    11-10-2015
    Location
    Orlando, FL
    MS-Off Ver
    Windows and MAC
    Posts
    3

    Re: How do i fix "Run-time error "1004" Application-defined or object-defined error"

    Im sorry about that, it is fixed and is now following the rules of the forum

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,688

    Re: How do i fix "Run-time error "1004" Application-defined or object-defined error"

    BinCoeff = WorksheetFunction.Combin(n, k)
    If n <= k ---> error 1004

    For G3 = G2 + 1 To n - n....n - n = 0 but, assuming G2+1 is always >0, you need to Step -1 or something

    Cost = Cost + Sheets(1).Cells(G4, 2)

    There is no G4 Dim'd or used anywhere else in the code

  5. #5
    Registered User
    Join Date
    11-10-2015
    Location
    Orlando, FL
    MS-Off Ver
    Windows and MAC
    Posts
    3

    Re: How do i fix "Run-time error "1004" Application-defined or object-defined error"

    G4 is suppose to represent the cost, at least thats my understanding. I found a VBA that works and creates permutations of 6 people. On sheet one in column "A" would be the names of people and column "B" would be the cost associated with these people. Ill post the original code so you could compare.


    Please Login or Register  to view this content.
    when you fill column "A" with names and column "B" with price, it will create the permutations on sheet 2. My goal by modifying this, is so i could find the permutations for 2, 3, and 4, variables as opposed to 6 like it shows in the code listed above.
    Last edited by 02Dade12; 11-13-2015 at 09:51 PM.

+ 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] Frequently Used Macro now Giving a" Runtime Error '1004 Application-Object Defined Error"
    By rjw524 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-02-2015, 02:39 PM
  2. [SOLVED] Run time error:1004 "Application defined or Object defined error"
    By mvneema in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-07-2014, 09:47 AM
  3. [SOLVED] Error " Run-time error '1004': application defined or object defined error
    By lengwer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2013, 07:26 AM
  4. Error When Implementing Code: "1004 - Application-defined or object-defined error"
    By blueblazingdemon in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-10-2013, 11:21 AM
  5. Replies: 1
    Last Post: 05-06-2013, 06:07 AM
  6. Run-time error "1004" Application defined or object-define-error
    By josros60 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-21-2013, 01:14 PM
  7. [SOLVED] 1004 "Application-defined or object-defined error"
    By guiu in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-12-2006, 10:45 AM

Tags for this Thread

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