Results 1 to 5 of 5

I need help!

Threaded View

  1. #1
    Registered User
    Join Date
    06-19-2012
    Location
    Oklahoma, USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    I need help!

    I am trying to use a paste special that works when an input in my spreadsheet is changed, but for some reason I get into an iterative loop and then crash excel. Can someone tell me why this code doesn't work? And possibly offer suggestions.

    Private Sub Worksheet_Change(ByVal Target As Range)
    
        Dim KeyCells As Range
    
        Set KeyCells = Range("c7:c17")
        
        If Not Application.Intersect(KeyCells, Range(KeyCells.Address)) _
               Is Nothing Then
            
        Range("H36").Select
        Selection.Copy
        Range("C26").Select
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Range("F26").Select
        Application.CutCopyMode = False
            
            
            MsgBox ("it worked")
            
        End If
    End Sub
    Last edited by ChrisB2011; 06-19-2012 at 11:43 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