+ Reply to Thread
Results 1 to 3 of 3

RUN TIME ERROR '1004' error handling help needed

  1. #1
    Registered User
    Join Date
    10-09-2014
    Location
    london
    MS-Off Ver
    2010
    Posts
    5

    RUN TIME ERROR '1004' error handling help needed

    Not sure why, but am getting an error I don’t understand and so haven’t managed to debug.

    the error is: RUN TIME ERROR '1004'

    The subsequent code from this is below (relevant in yellow) – I think as the previous sub-routine doesn’t complete, we lose the index for this one – if I’ve not misunderstood is there a quick error handler we could squeeze in here for that?

    CODE:

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    On Error GoTo 0
    If Target.Column = 2 And Target.Row = 1 Then 'Target cell with Loan ID
    Application.ScreenUpdating = False
    Application.Calculation = xlCalculationManual

    ReDim Preserve CurrentID(Sheets.Count)
    CurrentID(Target.Worksheet.Index) = Target 'Refers to global DATAID
    '----------DUMP-------------
    Dump PreviousID(Target.Worksheet.Index), _
    Target.Worksheet.Name
    'Dump previous data
    '---------POPUP-------------
    Pop CurrentID(Target.Worksheet.Index), _
    Target.Worksheet.Name 'Populate current ID data
    '---------------------------
    ReDim Preserve PreviousID(Sheets.Count)
    PreviousID(Target.Worksheet.Index) = _
    CurrentID(Target.Worksheet.Index) 'Refers to global DATAID

    Application.Calculation = xlCalculationAutomatic
    Application.ScreenUpdating = True
    End If
    End Sub

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: RUN TIME ERROR '1004' error handling help needed

    Where's the rest of the code?

    PS Can you add code tags when posting code?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    10-09-2014
    Location
    london
    MS-Off Ver
    2010
    Posts
    5

    Re: RUN TIME ERROR '1004' error handling help needed

    here's code running in module:

    Please Login or Register  to view this content.
    and here is code in sheet again for your reference:

    Please Login or Register  to view this content.

+ 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. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  2. HELP NEEDED - Run-time error '1004'
    By Steven8294 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-20-2012, 10:28 AM
  3. Replies: 2
    Last Post: 03-23-2011, 09:45 AM
  4. VB handling on mdi print error code 1004
    By Walter L. skinner in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-05-2005, 11:05 AM
  5. [SOLVED] Help needed with Run Time Error 1004
    By Manesh in forum Excel General
    Replies: 0
    Last Post: 04-04-2005, 01:07 AM

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