Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
determining the cutcopy range progamatically jc Excel Programming 4 June 5th 08 06:48 PM
VBA always creates linked chart even when using PasteExcelTable False, False, False in Office 2007 Matt Simpson Excel Programming 0 August 6th 07 08:11 PM
Combo Box goes to edit mode even if design mode is in OFF position Chas Excel Discussion (Misc queries) 0 January 7th 05 07:21 PM
coverting answer from Radian mode to degree mode Xmastrzman Excel Worksheet Functions 1 November 10th 04 04:45 PM
True Or False, no matter what... it still displays the false statement rocky640[_2_] Excel Programming 2 May 13th 04 04:57 PM


All times are GMT +1. The time now is 05:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"