+ Reply to Thread
Results 1 to 2 of 2

Error runtime 1004 : Application-defined or object defined error

  1. #1
    Registered User
    Join Date
    05-25-2014
    Posts
    2

    Error runtime 1004 : Application-defined or object defined error

    Hi guys,
    this is my first post here.

    I've been searching for solutions in different threads and forums, and tried to apply them for 4 hours now. and still nothing.

    I am very new to vba and macros, so bear with me.

    i am trying to turn a list into a correlation matrix.
    Goes like this :

    From :

    1 1 1
    1 2 0.6
    1 3 0.7
    2 2 1
    2 3 0.9
    3 3 1

    to

    1 2 3
    1 1 0.5 0.6
    2 e 1 0.9
    3 e e 1

    the first list is from worksheet 1, and im trying to create the matrix in worksheet 2. Both worksheet is in the same open workbook.


    here's the code i've been using

    Sub button1_click()
    Dim i As Integer
    Dim j As Integer
    Dim b As Integer
    Dim a As Integer
    Dim c As Integer

    a = 0
    i = 1
    j = 1
    c = 1
    Do While b < 3656
    <--- 3655 is the length of the list down
    i = i + a
    j = j + a
    c = c + a

    Do While c < 86
    <---- matrix is 85 x 85
    Worksheets(2).Cells(i, j).Value = Worksheets(2).Cells(b, 1).Value
    b = b + 1
    j = j + 1
    c = c + 1
    Loop

    c = 1
    i = 1
    j = 1
    a = a + 1
    Loop

    end sub


    Now the weird thing is,
    this worked on a smaller matrix before (31 x 31)

    but now it just would't work at all (85 x 85)

    it keeps giving me the error run time 1004 : application defined or object defined error.

    here's the file :
    matrix.xlsx

    anyone please help?

    thank you so very much
    Last edited by pramana; 05-25-2014 at 08:58 AM.

  2. #2
    Registered User
    Join Date
    05-25-2014
    Posts
    2

    Re: Error runtime 1004 : Application-defined or object defined error

    anyone, please help?

+ 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. Runtime error 1004 - Application Defined or Object Defined error
    By andreroux in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-06-2013, 10:56 AM
  2. Replies: 0
    Last Post: 05-14-2012, 11:59 PM
  3. Runtime error '1004' Application-defined or object-defined error Comment
    By Willer in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-17-2011, 03:02 PM
  4. RE: Runtime error 1004- application defined or object defined erro
    By Novice in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-06-2006, 05:40 PM
  5. [SOLVED] RE: Runtime error 1004- application defined or object defined erro
    By Jim Thomlinson in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-06-2006, 05: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