Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
determining the cutcopy range progamatically | Excel Programming | |||
VBA always creates linked chart even when using PasteExcelTable False, False, False in Office 2007 | Excel Programming | |||
Combo Box goes to edit mode even if design mode is in OFF position | Excel Discussion (Misc queries) | |||
coverting answer from Radian mode to degree mode | Excel Worksheet Functions | |||
True Or False, no matter what... it still displays the false statement | Excel Programming |