#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default paste code

This code has worked good for me in the past:

Dim rng As Range
Set rng = ActiveSheet.AutoFilter.Range
rng.Copy Destination:=Worksheets("Stepdown").Range("A1")

However, it doesn't copy the formulas in the range to the destination as
formulas but converst them to text. How can I modify my code so that it
copies all the formulas, too?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default paste code

You could paste the formulas in a separate step:

Dim ws As Worksheet
Set ws = Worksheets("Stepdown")
Dim rng As Range
Set rng = ActiveSheet.AutoFilter.Range
rng.Copy Destination:=ws.Range("A1")
rng.Copy
ws.Activate
ws.Range("A1").PasteSpecial Paste:=xlPasteFormulas


scrabtree23 wrote:
This code has worked good for me in the past:

Dim rng As Range
Set rng = ActiveSheet.AutoFilter.Range
rng.Copy Destination:=Worksheets("Stepdown").Range("A1")

However, it doesn't copy the formulas in the range to the destination as
formulas but converst them to text. How can I modify my code so that it
copies all the formulas, too?



--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy and paste using vb code ASU Excel Discussion (Misc queries) 1 September 10th 06 01:41 AM
(Cut - Paste in Excel )code in vc++ Allen New Users to Excel 0 June 23rd 05 09:47 AM
Paste Code Todd Huttenstine[_2_] Excel Programming 1 December 18th 03 09:17 PM
Where do I paste this Code? Kevin Excel Programming 5 October 22nd 03 04:08 AM
Need Help with Code - Copy & Paste JStone0218 Excel Programming 10 October 11th 03 04:09 PM


All times are GMT +1. The time now is 08:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"