View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\) Rick Rothstein \(MVP - VB\) is offline
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