ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PasteSpecial Constant (https://www.excelbanter.com/excel-programming/397867-pastespecial-constant.html)

Rick

PasteSpecial Constant
 
When using this function : Selection.PasteSpecial
Paste:=xlValues,Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

How do I change it to past a Public Constant?

kassie

PasteSpecial Constant
 
Activecell.value = constName
where you replace constName with the name of the constant

--
Hth

Kassie Kasselman
Change xxx to hotmail


"Rick" wrote:

When using this function : Selection.PasteSpecial
Paste:=xlValues,Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

How do I change it to past a Public Constant?


Rick

PasteSpecial Constant
 
Thanks Kassie, worked like a champ.

"Rick" wrote:

When using this function : Selection.PasteSpecial
Paste:=xlValues,Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

How do I change it to past a Public Constant?


kassie

PasteSpecial Constant
 
My pleasure!
--
Hth

Kassie Kasselman
Change xxx to hotmail


"kassie" wrote:

Activecell.value = constName
where you replace constName with the name of the constant

--
Hth

Kassie Kasselman
Change xxx to hotmail


"Rick" wrote:

When using this function : Selection.PasteSpecial
Paste:=xlValues,Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

How do I change it to past a Public Constant?


JE McGimpsey

PasteSpecial Constant
 
One caveat:

Instead of ActiveCell, to be fully equivalent, one should use Selection:

Selection.Value = constName

since in the OP's example, Selection could involve multiple cells.



In article ,
kassie wrote:

Activecell.value = constName
where you replace constName with the name of the constant

--
Hth

Kassie Kasselman
Change xxx to hotmail


"Rick" wrote:

When using this function : Selection.PasteSpecial
Paste:=xlValues,Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

How do I change it to past a Public Constant?



All times are GMT +1. The time now is 12:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com