+ Reply to Thread
Results 1 to 2 of 2

worksheet change doesn't always work

  1. #1
    damorrison
    Guest

    worksheet change doesn't always work

    I have noticed that the worksheet change doesn't always work,
    expecially when I have been working on excel for a while and have
    opened and closed a lot of workbooks,or if I have used VBA help alot...
    if I reboot the computer and open a workbook that has a worksheet
    change event it works fine, is there a way around this besides
    rebooting the computer,
    Here's the code I am using for one of the sheets: but I am sure it is
    not the code because I have noticed this behaviour in othe workbooks...

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address = "$A$5" Then
    Range("G5").Select
    ActiveCell.FormulaR1C1 = "=ROUNDUP(RC[-1]/8.0625,0)"
    Range("C5").Select
    Application.SendKeys "%{down}"
    End If
    If Target.Address = "$C$5" Then
    Range("D5").Select
    Application.SendKeys "%{down}"
    End If
    If Target.Address = "$D$5" Then
    Range("B10").Select
    Application.SendKeys "%{down}"
    End If

    If Union(Range("$b10:$b12"), Target).Address =
    Range("$b10:$b12").Address Then
    UserForm2.Show False
    myRow = Target.Row
    End If


    End Sub


  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Response

    It would be worth checking the status of Application.EnableEvents. If this has been set to false by some process, the events aren't detected.
    Martin

+ 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