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 |
CutCopy mode goes to False
Almost (all???) every macro that does anything destroys the clipboard.
It's one of the tradeoffs between macros and manual editing. Steven wrote: 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 -- Dave Peterson |
All times are GMT +1. The time now is 12:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com