+ Reply to Thread
Results 1 to 3 of 3

VBA Code error

  1. #1
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    VBA Code error

    In one worksheet i have created the following code, which adds date to
    specific column when data is entered in colum A.

    Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    If Target.Column = 1 Then
    Target.Offset(0, 10).Value = Now()
    End If
    End Sub

    The problem is that when trying to delete a whole row, error message pops-up.
    Run-time error '1004'
    Application-defined or object -defined error

    When click "End" actually everthing is ok, the row has been deleted, but
    was just wondering what is causing that error.

    If anybody can help with this issue, it will be greatlly appreciated.
    Last edited by Bob@Sun; 09-21-2009 at 05:21 AM.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,485

    Re: VBA Code error

    Plase add code tags to your post.


    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: VBA Code error

    Great!!!!

    That worked just perfect.

    Thanks alot!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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