ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   cells in clippboard?!? (https://www.excelbanter.com/excel-programming/347879-cells-clippboard.html)

Juggernath[_4_]

cells in clippboard?!?
 
How to put values into the clippboard in macro but with defined formats etc?
I have array of input data which i access via selection property. That data
are processed and now i have to put array of results in clippboard. After
macro ends its work, I'd like to select any part of a worksheet and then
paste an array of formated result data



keepITcool

cells in clippboard?!?
 
you cant.

you can:
hold an array in memory
manaipulate values in array
write array to cells
then format cells.

reserve a range in a sheet
manipulate values and formats in that range
copy the range to destination.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Juggernath wrote :

How to put values into the clippboard in macro but with defined
formats etc? I have array of input data which i access via selection
property. That data are processed and now i have to put array of
results in clippboard. After macro ends its work, I'd like to select
any part of a worksheet and then paste an array of formated result
data


Juggernath[_4_]

cells in clippboard?!?
 
Thanx,
and then, can i cut (from macro) that range to put it into a clippboard :) ?

"keepITcool" wrote in message
.com...
you cant.

you can:
hold an array in memory
manaipulate values in array
write array to cells
then format cells.

reserve a range in a sheet
manipulate values and formats in that range
copy the range to destination.

--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Juggernath wrote :

How to put values into the clippboard in macro but with defined
formats etc? I have array of input data which i access via selection
property. That data are processed and now i have to put array of
results in clippboard. After macro ends its work, I'd like to select
any part of a worksheet and then paste an array of formated result
data




keepITcool

cells in clippboard?!?
 
that's what a cut command does isn't it.
easiest is to do the cut/paste on 1 line.

Sub hmm()

With Range("sheet1!a2:a5")
.Clear
.Value = Application.Transpose(Array(1, 2, 3, 4))
.Font.Bold = True
.Interior.Color = vbRed

'cut/paste it to a specified range
.Cut Range("Sheet3!d4:d7")

End With

End Sub






--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Juggernath wrote :

Thanx,
and then, can i cut (from macro) that range to put it into a
clippboard :) ?

"keepITcool" wrote in message
.com...
you cant.

you can:
hold an array in memory
manaipulate values in array
write array to cells
then format cells.

reserve a range in a sheet
manipulate values and formats in that range
copy the range to destination.

-- keepITcool
www.XLsupport.com | keepITcool chello nl | amsterdam



Juggernath wrote :

How to put values into the clippboard in macro but with defined
formats etc? I have array of input data which i access via
selection property. That data are processed and now i have to put
array of results in clippboard. After macro ends its work, I'd
like to select any part of a worksheet and then paste an array of
formated result data



All times are GMT +1. The time now is 03:01 AM.

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