Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Specify which sheet to paste to

I have recorded a simple macro and want to specify that it always pastes into
the sheet named 'Link'
here is my current code
Sub McrUpdateLink()
'
' McrUpdateLink Macro
' Macro recorded 06/15/2006
'

'
Cells.Select
Selection.Copy
ActiveSheet.Previous.Select
Cells.Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Range("A2").Select
ActiveSheet.Next.Select
Range("H2").Select
End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Specify which sheet to paste to


I have changed a couple of lines below, not tried them but give it a go
it should work

Regards,
Simon

Sub McrUpdateLink()
'
' McrUpdateLink Macro
' Macro recorded 06/15/2006

Cells.Select
Selection.Copy
ActiveSheet.Previous.Select
Cells.Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=
_
False, Transpose:=False
Application.CutCopyMode = False
Range("A2").Select
Sheets("Link").Select 'I think this is the line you need
Range("H2").Select
ActiveSheet.paste 'and this one to paste in to H2 on the sheet named
Link
End Sub


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=552359

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
How to automatically paste cells from one sheet to another sheet? Jenni Excel Discussion (Misc queries) 1 March 24th 10 11:16 PM
Alternate Row Select in Sheet 1 then Paste to Sheet 2 Steevo Excel Worksheet Functions 4 December 5th 08 06:45 PM
Copy from one Sheet and paste on another sheet based on condition Prem Excel Discussion (Misc queries) 2 December 24th 07 05:05 AM
Active Cell Copy And Paste Sheet to Sheet A.R.J Allan Jefferys New Users to Excel 4 May 4th 06 02:04 AM
automatic copy and paste from sheet to sheet in a workbook ramseyjramseyj Excel Programming 6 December 11th 04 12:37 AM


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