View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
steven steven is offline
external usenet poster
 
Posts: 389
Default CutCopy mode goes to False

I have the following code in the Selection_Change of a worksheet. It makes
the CutCopyMode go to False. I think it is in the
Application.WorksheetFunction.VLookup.

Is that the issue?

Thank you,

Steven

On Error Resume Next
Dim vAcct, vSBString As String
Dim rAcct As Range
Dim vAcctDescr As Variant
If IsEmpty(Cells(ActiveCell.Row, 3)) = True Or Len(Cells(ActiveCell.Row, 3))
= 0 Then
Application.StatusBar = False
Else
vAcct = Cells(ActiveCell.Row, 3)
Set rAcct = Worksheets("Sheet2").Range("a:b")
vAcctDescr = Application.WorksheetFunction.VLookup(vAcct, rAcct, 2, 0)
If IsError(vAcctDescr) = True Or IsEmpty(vAcctDescr) = True Then

Else
vSBString = vAcct + " " + vAcctDescr
Application.DisplayStatusBar = True
Application.StatusBar = vSBString
End If
End If