LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Paste copied data to specified sheet based on range - variable iss

I have the following macro that copies data from the 'Daily Team Performance'
sheet and then dependant on the content of cell B4 on that sheet, should copy
this data to the respective named sheet on the 'buzz' workbook.

The problem is that when I try to run it I get the 'Invalid Qualifier'
message he Set rDestination = Destsheet.Range("B4")...

Can anyone see what I am doing wrong as the other option is screeds of code
for every variation.

Sub UpdateData()

Dim Destsheet As String
Destsheet = Range("Daily Team Performance!B4")

Dim rSource As Excel.Range
Dim rDestination As Excel.Range

Set rSource = ActiveSheet.Range("Daily Team Performance!B4:M103")
Set rDestination = Destsheet.Range("B4")

rSource.Copy
rDestination.Select

Selection.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False

Range("A1").Select

Application.CutCopyMode = False

valKill:
Set rSource = Nothing
Set rDestination = Nothing

Exit Sub

End Sub

 
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
Selecting Range Based on Cell Content then Copy/Paste to New Sheet,Looping pwk Excel Programming 2 September 26th 09 02:18 PM
Paste cells copied from another sheet JoyceTEM Excel Discussion (Misc queries) 2 July 9th 09 08:58 PM
Assign copied range to a variable johnmasvou Excel Programming 3 March 20th 09 10:44 AM
Copy&Paste variable range based on cell value Thomas Excel Programming 0 July 27th 07 06:40 PM
Finding a named range based on cell value and copy/paste to same sheet? Simon Lloyd[_715_] Excel Programming 1 May 11th 06 11:25 PM


All times are GMT +1. The time now is 06:07 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"