Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Help with this error "PasteSpecial method of Range class failed !!

Here is the code:
lRow = Worksheets("BO Download").Cells(Rows.Count, "BJ").End(xlUp).Row
Worksheets("BO Download").Range("BJ4:BK" & lRow - 3).Copy
Worksheets("Completions Summary (Vendor)").Select
Range("B4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks:=False, Transpose:=False

The only other thing is that I have a Worksheet_SelectionChange(ByVal Target
As Range) sub for Worksheets("Completions Summary (Vendor)") as follows:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim c As Range, rngAll As Range
Dim ws As Worksheet
Dim lRow As Long

lRow = Me.Cells(Rows.Count, "B").End(xlUp).Row
Application.ScreenUpdating = False
Me.Rows("4:" & lRow).EntireRow.Hidden = False

If Me.Range("B5") = "" Then

Else
With ActiveCell
If .Value = "Market" Then
Me.Rows("4:" & lRow - 1).EntireRow.Hidden = False
Me.Range("B" & lRow).Value = "TOTALS"
Call sumALL(Me)

ElseIf Left(.Address, 2) = "$B" Then
If Right(.Address, 1) = 4 And Right(.Address, 2) <= lRow -
1 Then
Application.EnableEvents = False
Me.Range("B" & lRow).Value = "MARKET TOTALS"
For Each c In Me.Range("B4:B" & lRow - 1).Cells
If c.Value < .Value Then
If rngAll Is Nothing Then
Set rngAll = c
Else
Set rngAll = Union(rngAll, c)
End If
End If
Next c
If Not rngAll Is Nothing Then rngAll.EntireRow.Hidden =
True
Call sumREGION(Me, .Value)
Application.EnableEvents = True
End If
End If
End With
End If
Me.Calculate
End Sub

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
Run Time error 1004 - Pastespecial method of range class failed. oli merge Excel Programming 3 February 1st 10 01:46 PM
PasteSpecial Method of Range Class Failed Error a Different Versio SteveC Excel Programming 10 February 16th 07 03:08 PM
PasteSpecial Method of Range Class Failed Error Brian C Excel Programming 5 March 30th 06 08:01 PM
runtime error 1004 pastespecial method of range class failed dreamz[_29_] Excel Programming 5 February 3rd 06 02:57 PM
Run-time error '1004' PasteSpecial Method of Range Class Failed Kevin G[_2_] Excel Programming 1 February 3rd 04 05:01 AM


All times are GMT +1. The time now is 08:30 PM.

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"