Results 1 to 9 of 9

Disable Run-Time Errors "Application.DisplayAlerts = False" Not Working

Threaded View

  1. #3
    Forum Expert Whizbang's Avatar
    Join Date
    08-05-2009
    Location
    Greenville, NH
    MS-Off Ver
    2010
    Posts
    1,395

    Re: Disable Run-Time Errors "Application.DisplayAlerts = False" Not Working

    Upon testing your code as is, I am not getting an error unless, as I said, I have multiple cells selected when the change occurs.

    However, looping will solve this issue:

    Private Sub Worksheet_Change(ByVal Target As Range)
    
        Dim FindMe As String
        Dim Rng As Range
        Dim Cll As Range
        If Target.Column = 30 Then
            For Each Cll In Target.Cells
                FindMe = Cll.Value
                With Sheets("Data").Range("Item_Code")
                    Set Rng = .Find(What:=FindMe, _
                            After:=.Cells(.Cells.Count), _
                            LookIn:=xlValues, _
                            LookAt:=xlWhole, _
                            SearchOrder:=xlByRows, _
                            SearchDirection:=xlNext, _
                            MatchCase:=False)
                    If Not Rng Is Nothing Then
                        Target.Offset(0, 1).Value = Rng.Offset(0, 1).Value
                        Target.Offset(0, 3).Value = Rng.Offset(0, 2).Value
                        Target.Offset(0, 5).Value = Rng.Offset(0, 3).Value
                        Target.Offset(0, 6).Value = Rng.Offset(0, 4).Value
                        Target.Offset(0, 7).Value = Rng.Offset(0, 5).Value
                    End If
                End With
            Next Cll
        End If
    
    End Sub
    Last edited by Whizbang; 04-12-2012 at 10:22 AM.

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