Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default PasteSpecial not happening

xl2000
The sub SortbyRank is not working for some reason. Instead all I am getting
is the selected range("CE7:CL26") on each worksheet
Should I be doing some sort of "For each sheet" in addition to what I am
already doing?
SortbyRank runs of Test
Any help would be appreciated.
Ta,
Martin

Public Sub SortbyRank(wks As Worksheet)
Application.ScreenUpdating = False
On Error Resume Next
With wks
.Range("K7:R26").Copy
.Range("CE7:CL26").PasteSpecial _
Operation:=xlPasteValues
Application.ScreenUpdating = True
End With
End Sub

Public Sub Test()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
If Left(wks.Name, 1) = "R" Then
With wks
SortbyRank wks
End With
End If
Next
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default PasteSpecial not happening

I have just tried adding the "For each Ws in Worksheets" as below but it
still is not working.
I have also tried changing pastevalues to pasteall. That works but is not
what i want as in includes links, formats, etc. I am hoping that
pastevalues will do just that an no more.
Any help would be greatly appreciated.
Ta,
Martin

Public Sub SortbyRank(wks As Worksheet)
Application.ScreenUpdating = False
On Error Resume Next
Dim Ws As Worksheets
With wks
For Each Ws In Worksheets
.Range("K7:R26").Copy
.Range("CE7:CL26").PasteSpecial _
Operation:=xlPasteValues
Next
Application.ScreenUpdating = True
End With
End Sub

"Martin Wheeler" wrote in message
...
xl2000
The sub SortbyRank is not working for some reason. Instead all I am

getting
is the selected range("CE7:CL26") on each worksheet
Should I be doing some sort of "For each sheet" in addition to what I am
already doing?
SortbyRank runs of Test
Any help would be appreciated.
Ta,
Martin

Public Sub SortbyRank(wks As Worksheet)
Application.ScreenUpdating = False
On Error Resume Next
With wks
.Range("K7:R26").Copy
.Range("CE7:CL26").PasteSpecial _
Operation:=xlPasteValues
Application.ScreenUpdating = True
End With
End Sub

Public Sub Test()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
If Left(wks.Name, 1) = "R" Then
With wks
SortbyRank wks
End With
End If
Next
End Sub




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default PasteSpecial not happening

got it, well worked out another way.
Ta,
Martin
"Martin Wheeler" wrote in message
...
I have just tried adding the "For each Ws in Worksheets" as below but it
still is not working.
I have also tried changing pastevalues to pasteall. That works but is not
what i want as in includes links, formats, etc. I am hoping that
pastevalues will do just that an no more.
Any help would be greatly appreciated.
Ta,
Martin

Public Sub SortbyRank(wks As Worksheet)
Application.ScreenUpdating = False
On Error Resume Next
Dim Ws As Worksheets
With wks
For Each Ws In Worksheets
.Range("K7:R26").Copy
.Range("CE7:CL26").PasteSpecial _
Operation:=xlPasteValues
Next
Application.ScreenUpdating = True
End With
End Sub

"Martin Wheeler" wrote in message
...
xl2000
The sub SortbyRank is not working for some reason. Instead all I am

getting
is the selected range("CE7:CL26") on each worksheet
Should I be doing some sort of "For each sheet" in addition to what I am
already doing?
SortbyRank runs of Test
Any help would be appreciated.
Ta,
Martin

Public Sub SortbyRank(wks As Worksheet)
Application.ScreenUpdating = False
On Error Resume Next
With wks
.Range("K7:R26").Copy
.Range("CE7:CL26").PasteSpecial _
Operation:=xlPasteValues
Application.ScreenUpdating = True
End With
End Sub

Public Sub Test()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
If Left(wks.Name, 1) = "R" Then
With wks
SortbyRank wks
End With
End If
Next
End Sub






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default PasteSpecial not happening

See how great this list is.

--
Don Guillett
SalesAid Software

"Martin Wheeler" wrote in message
...
got it, well worked out another way.
Ta,
Martin
"Martin Wheeler" wrote in message
...
I have just tried adding the "For each Ws in Worksheets" as below but it
still is not working.
I have also tried changing pastevalues to pasteall. That works but is

not
what i want as in includes links, formats, etc. I am hoping that
pastevalues will do just that an no more.
Any help would be greatly appreciated.
Ta,
Martin

Public Sub SortbyRank(wks As Worksheet)
Application.ScreenUpdating = False
On Error Resume Next
Dim Ws As Worksheets
With wks
For Each Ws In Worksheets
.Range("K7:R26").Copy
.Range("CE7:CL26").PasteSpecial _
Operation:=xlPasteValues
Next
Application.ScreenUpdating = True
End With
End Sub

"Martin Wheeler" wrote in message
...
xl2000
The sub SortbyRank is not working for some reason. Instead all I am

getting
is the selected range("CE7:CL26") on each worksheet
Should I be doing some sort of "For each sheet" in addition to what I

am
already doing?
SortbyRank runs of Test
Any help would be appreciated.
Ta,
Martin

Public Sub SortbyRank(wks As Worksheet)
Application.ScreenUpdating = False
On Error Resume Next
With wks
.Range("K7:R26").Copy
.Range("CE7:CL26").PasteSpecial _
Operation:=xlPasteValues
Application.ScreenUpdating = True
End With
End Sub

Public Sub Test()
Dim wks As Worksheet
For Each wks In ActiveWorkbook.Worksheets
If Left(wks.Name, 1) = "R" Then
With wks
SortbyRank wks
End With
End If
Next
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
Can anybody stop this happening please Pammi J New Users to Excel 4 February 18th 08 10:58 AM
Don't know what is happening.... B.Kundla Excel Discussion (Misc queries) 4 September 22nd 05 08:06 PM
Why this is happening springwinterfall Charts and Charting in Excel 4 January 9th 05 02:16 PM
Why is this happening? retcgr Excel Worksheet Functions 2 November 21st 04 11:20 PM
what's the Bug....tell me what's happening??? foamfollower Excel Programming 4 February 1st 04 04:04 PM


All times are GMT +1. The time now is 10:06 PM.

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

About Us

"It's about Microsoft Excel"