Results 1 to 16 of 16

HELP WITH ERROR CODE '1004' Application-defined or object defined error

Threaded View

  1. #1
    Registered User
    Join Date
    04-16-2015
    Location
    Scotland
    MS-Off Ver
    2007
    Posts
    40

    HELP WITH ERROR CODE '1004' Application-defined or object defined error

    Hi guys I am doing a uni project and I am having problems with my VBA coding. I got help with the coding from ARowbot on here and he has really been a big help. However for some reason whenever I run my code although it still does what it is meant to do, i still get error code '1004' and it says 'Application-defined or object defined error'. I really do not know how to get rid of the error. the code is shown below

    Sub InsulationSAVE()
    Dim i, p As Integer
    ' InsulationSAVE Macro
    Sheets("InsulationMonthly").Unprotect
    For i = 5 To 16
        If Sheets("InsulationMONTHLY").Cells(4, i) = UCase(Format(Now, "mmm")) Then
            p = Sheets("INSULATION").Range("G" & Rows.Count).End(3).Row
            Sheets("INSULATION").Range("P5:P" & p).Copy
            Sheets("InsulationMONTHLY").Cells(5, i).PasteSpecial Paste:=xlPasteValues
            Application.CutCopyMode = False
            Sheets("INSULATION").Range("J5:N" & p).ClearContents
            Sheets("InsulationMONTHLY").Range(Cells(5, "E"), Cells(p, i)).Locked = True
            Sheets("InsulationMONTHLY").Protect
            Exit Sub
        End If
    Next i
    End Sub
    I have attached the file here below..UNI (F) STOCK TAKE 2015 N M.xlsm

    Thanks guys

    Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #3 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
    Last edited by QuintonMcCloud; 04-20-2015 at 10:44 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA ERROR: run time error 1004: Application-defined or Object-defined error in excel 2013
    By AnanthKrishna in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2015, 06:16 AM
  2. Replies: 1
    Last Post: 03-12-2014, 12:42 PM
  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. [SOLVED] Error 1004: Application-defined or object-defined error on Range(Cells(x,y)) syntax
    By winch in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-04-2013, 11:02 AM
  5. Replies: 2
    Last Post: 09-12-2012, 01:01 PM

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