Results 1 to 4 of 4

VBA Code for IF Statement returns Run-Time Error 1004

Threaded View

  1. #1
    Registered User
    Join Date
    01-19-2012
    Location
    Pensacola, FL
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    8

    VBA Code for IF Statement returns Run-Time Error 1004

    For some reason I can't get this to work. Any Ideas/Suggestions? I'm VERY new with VBA programming
      If IsEmpty(wsDest.Range(UserExternalID)) Then
                wsDest.Range(UserExternalID).Value = iCell.Offset(0, 1).Value
                wsDest.Range(UserExternalID).Offset(0, -1).Value = iCell.Offset(0, 2).Value
                wsDest.Range(UserExternalID).Offset(0, 1).Value = iCell.Offset(0, 4).Value
                wsDest.Range(UserExternalID).Offset(0, 2).Value = iCell.Offset(0, 5).Value
            Else
                wsDest.Range(UserExternalID).Offset(-1, 0).End(x1down).Offset(1, 0).Value = iCell.Offset(0, 1).Value
                wsDest.Range(UserExternalID).Offset(-1, 0).End(x1down).Offset(1, 0).Value = iCell.Offset(0, 2).Value
                wsDest.Range(UserExternalID).Offset(-1, 0).End(x1down).Offset(1, 0).Value = iCell.Offset(0, 4).Value
                wsDest.Range(UserExternalID).Offset(-1, 0).End(x1down).Offset(1, 0).Value = iCell.Offset(0, 5).Value
    Any and All Help is appreciated thank You!!
    Last edited by esphero; 03-22-2012 at 07:14 AM. Reason: change Title

Thread Information

Users Browsing this Thread

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

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