+ Reply to Thread
Results 1 to 4 of 4

Debug problem when highlighting?

Hybrid View

Zirus Debug problem when... 06-06-2007, 01:23 PM
Guest Maybe try changing If... 06-06-2007, 03:01 PM
mudraker Try changing Target to rng in... 06-06-2007, 06:07 PM
Zirus Thanks guys, I got it... 06-08-2007, 07:47 AM
  1. #1
    mpeplow
    Guest
    Maybe try changing
    If Target > 1
    to
    If Val(Target) > 1
    or
    If Len(Target) > 1
    What is in your cells? What is the Value of Target when the code breaks? Is it a number? Is it text?

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Try changing Target to rng in the for loop

    For Each rng In Target
          If Not Application.Intersect(rng, Range("c10:c110")) Is Nothing Then
       **    If rng> 1 Then
                If IsEmpty(Cells(rng.Row, "e")) Then
                   Application.EnableEvents = False
                   Cells(rng.Row, "e").Value = Now()
                End If
             End If
          End If
       Next rng
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Registered User
    Join Date
    05-11-2007
    Location
    A hole in the US.
    Posts
    29
    Thanks guys, I got it working. I was fixing to plug in the first suggestion, when I happen to look down at the next code section and it said "If rng.Value > 1 Then", so it hit me, well I should prob. try that first to keep it consistant...hehe but it seemed to work. Thanks guys.

+ 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