Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 334
Default Paste a constant

I'm using the following code to past activeCell data to a different sheet in
a different book. My problem is how do I past a constant in the next cell to
the right?

ThsWrkBk.Activate
Sheets(MstrSht).Activate
ActiveCell.Offset(0, 5).Activate
ActiveCell.Select
Selection.Copy
Workbooks(BkNme).Activate
Sheets(ShtNme).Select
ActiveCell.Offset(0, 1).Activate
ActiveCell.Select
Selection.PasteSpecial Paste:=XlPasteVariable(PstTyp), Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
ActiveCell.Offset(0, 1).Activate
ActiveCell.Select
What goes here if I want to paste a constant of "N"?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Paste a constant

I'm using the following code to past activeCell data to a different sheet
in
a different book. My problem is how do I past a constant in the next cell
to
the right?

ThsWrkBk.Activate
Sheets(MstrSht).Activate
ActiveCell.Offset(0, 5).Activate
ActiveCell.Select
Selection.Copy
Workbooks(BkNme).Activate
Sheets(ShtNme).Select
ActiveCell.Offset(0, 1).Activate
ActiveCell.Select
Selection.PasteSpecial Paste:=XlPasteVariable(PstTyp),
Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
ActiveCell.Offset(0, 1).Activate
ActiveCell.Select
What goes here if I want to paste a constant of "N"?


Since "N" wasn't copied into the paste buffer, you can't Paste it into a
cell. However, why wouldn't this be just a straight assignment...

ActiveCell.Value = "N"

Rick

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
Keeping Conditional Formats 'Constant' when copy & paste Porky79 Excel Discussion (Misc queries) 0 May 1st 09 02:11 PM
Value used in a Paste Link to remain constant during a sort LawTrainer Excel Discussion (Misc queries) 1 February 24th 09 11:29 PM
Cell reference value to remain constant in a sort using Paste Link LawTrainer Excel Discussion (Misc queries) 2 February 24th 09 10:37 PM
Paste value from another workbook and multiply by constant burl_rfc_h Excel Programming 8 April 3rd 06 08:19 PM
remain constant in a copy & paste Viviank New Users to Excel 5 March 18th 06 10:33 PM


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