Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default Pastespecial code

Please help!

I have the following code that copies and pastes cell values from one sheet
to another based on a line number that is entered by the user. For some
reason, VB claims the last line with the pasteSpecial operation has incorrect
syntax. It is asking me to set it equal to an expression (!?!). I must be
doing something wrong but it looks just like the example, and TagInfo is a
valid range. What am I missing?


Dim LineInfo As Range
Dim TagInfo As Range
Dim TargetLine As Integer

TargetLine = Sheets("Tag Entry").Range("F6").Value


Set LineInfo = Sheets("Tally").Range("E2:J2").Offset(TargetLine, 0)
Set TagInfo = Sheets("Tag Entry").Range("C6:C11")



'Copy and paste line info for the selected line
LineInfo.Copy
TagInfo.PasteSpecial(xlPasteValues,xlPasteSpecialO perationNone,False,True)

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
PasteSpecial John Austin[_6_] Excel Programming 1 December 14th 05 03:32 PM
Code for meet cond, copy, pasteSpecial, ValuesOnly ufo_pilot Excel Programming 0 December 7th 05 01:48 PM
PasteSpecial Vicar Excel Programming 2 January 28th 05 02:03 PM
PasteSpecial Kevin Excel Programming 3 October 7th 04 01:07 PM
pastespecial billQ Excel Programming 2 July 29th 03 11:39 PM


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