PC Review


Reply
Thread Tools Rate Thread

CutCopy mode goes to False

 
 
Steven
Guest
Posts: n/a
 
      20th Jun 2008
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

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      20th Jun 2008
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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
CutCopy mode goes to False Steven Microsoft Access VBA Modules 1 20th Jun 2008 06:44 PM
determining the cutcopy range progamatically jc Microsoft Excel Programming 4 5th Jun 2008 06:48 PM
VBA always creates linked chart even when using PasteExcelTable False, False, False in Office 2007 Matt Simpson Microsoft Excel Programming 0 6th Aug 2007 08:11 PM
displays false unread mail when coming put of standby mode. =?Utf-8?B?VEdI?= Microsoft Outlook Discussion 1 8th Aug 2006 06:32 AM
asp.net: how do I detect if debug mode is true or false ? =?Utf-8?B?em9sb2Y=?= Microsoft Dot NET Framework 1 28th Jul 2006 02:55 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:13 AM.