View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
slc[_4_] slc[_4_] is offline
external usenet poster
 
Posts: 1
Default Short VB code for PasteValue


Hi,

I have these 2 lines of code which I hope to shorten it to 1 line.
Anyone have any idea how to do it?

Basically, I want to convert the formula in A1 to A3 to its value. In
the nutshell, I do a copy in range A1:A3 and then do a "Paste Special"
with values only.

Thanks for your help.

...start...
Range("A1:A3").Copy
Range("A1:A3").PasteSpecial Paste:=xlPasteValues
...end...


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/