+ Reply to Thread
Results 1 to 2 of 2

Error:1004 Prevent possible loss of data while running VBA Code

  1. #1
    Forum Contributor
    Join Date
    01-06-2017
    Location
    india
    MS-Off Ver
    2010
    Posts
    118

    Error:1004 Prevent possible loss of data while running VBA Code

    Hi,



    Pls find the attachment. I get rid of the below error.


    Sheets("Sheet2").Columns(i + 5).Resize(, 3).EntireColumn.Insert shift:=xlRight '-----error :1004 prevent possible loss of data

    Here i want to insert 3 columns after each date. but iam getting error.


    Pls correct it and explain when this error will come. Then How to fix



    regards
    shiva
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Error:1004 Prevent possible loss of data while running VBA Code

    explain when this error will come. Then How to fix
    The error is described perfectly in the error message along with the solution.

    For more information paste your thread title into a Google search and select the 3rd result. That is a Microsoft page describing the error for Excel 2000 but it is exactly the same cause for later versions.

+ 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] How to prevent worksheet code from running while Module Macro is running:
    By Chad Bateman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-11-2015, 09:26 AM
  2. After running the VBA CODE I am getting the 1004 ERROR with NO CELLS FOUND
    By Kandavalli.Kiran in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-07-2015, 03:30 PM
  3. Code breakdown when running on MS 2010 - Error 1004
    By gsurge in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-23-2014, 10:07 AM
  4. Prevent Loss of Data -- Error Message Pops Up
    By brit1sh in forum Excel General
    Replies: 3
    Last Post: 09-11-2013, 01:30 PM
  5. [SOLVED] Getting Error 1004 Object or Application Defined Error - Code to rearrange data
    By BlazzedTroll in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-10-2013, 12:10 PM
  6. Run-Time error '1004': when running my code
    By galvinpaddy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-11-2012, 03:19 PM
  7. Application Error 1004 running Pivot Code
    By grifter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-16-2012, 12:23 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