LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VBA Query

One other way

for a specified range
Worksheets("Sheet2").Range("A1:B200").Value = _
Worksheets("Sheet2").Range("A1:B200").Value

or for all the used area of the sheet
set rng = Worksheets("Sheet1").UsedRange
worksheets("Sheet2").Range(rng.address).Value = _
rng

--
Regards,
Tom Ogilvy


"mike" wrote in message
...

Hi Guys,

How would I programmatically copying the contents of
sheet1 (with formula's) and only paste the values onto
sheet 2.

I recorded the code and it works, but it crashes when you
try to run macro twice. The user has the option of
changing contents of sheet 1 as much as they want until
they are happy with result. Do I need to create a separate
sheet each time I run the macro?

Thanks,

Mike



 
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
Use MS Query to query data within the current work book Steve Kesler Excel Discussion (Misc queries) 0 August 6th 09 05:22 PM
Convert hard coded query criteria to Parameter Query Melanie[_2_] Excel Discussion (Misc queries) 0 July 15th 08 09:59 PM
Excel 2007 / MS Query - editing existing query to another sheet Hotpepperz Excel Discussion (Misc queries) 0 June 13th 08 06:53 PM
Microsoft Query rejects "nz" function in Access Query Vaughan Excel Discussion (Misc queries) 0 May 4th 05 05:20 PM
How to use a Access Query that as a parameter into Excel database query Karen Middleton Excel Discussion (Misc queries) 1 December 13th 04 07:54 PM


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

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

About Us

"It's about Microsoft Excel"