cells in clippboard?!?

J

Juggernath

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
 
K

keepITcool

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 :
 
J

Juggernath

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

keepITcool

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 :
 

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

Top