CutCopy mode goes to False

S

Steven

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
 
D

Dave Peterson

Almost (all???) every macro that does anything destroys the clipboard.

It's one of the tradeoffs between macros and manual editing.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top