Consulting

Results 1 to 6 of 6

Thread: Runtime error

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Runtime error

    I will try explain simple as i can.

    Capture.jpg

    when user writes in column K letter "P-" or "POVRV-" in column AN needs to show word "bla1" or
    letter "K-" or "KZD-" or "KMP-" in column AN needs to show word "bla2"




    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim myRange As Range
    Dim myCell As Range
    Set myRange = Range("K7:K1000")
    For Each myCell In myRange
    
    If myCell Like "*P-" Or myCell Like "*POVRV-" Then
    ActiveCell.Offset(-1, 21).Value = "bla1"      <--------Run-time error '-2147417848 (80010108)  , Method 'Value' of object 'Range' failed
    End If
    Next myCell
    End Sub
    Last edited by loop66; 09-30-2018 at 04:16 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •