Paste a constant

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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"?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top