Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > VBA / Office Integration > Excel > copy sheet to another


Reply
 
Thread Tools Display Modes
  #1  
Old 04-20-2004, 04:34 AM
Kibbs Kibbs is offline
Freshman
 
Join Date: Apr 2004
Posts: 29
Default copy sheet to another


I have a sheet that contains imported data and need to copy it to another sheet complete just copy and paste. However if someone changes the column size an error indicating different shape is received.

I have this code and figure there has to be a better way

Sheets("ImportData").Select
ActiveSheet.Cells.Select
Selection.Copy
Sheets("RawData").Select
ActiveSheet.Paste

I would have imported this directly to the Rawdata sheet however other sheets have formula dependancies.

Thanks

Wayne
Reply With Quote
  #2  
Old 04-20-2004, 10:39 AM
Jamirez's Avatar
Jamirez Jamirez is offline
Contributor
 
Join Date: Jan 2004
Location: Sherbrooke/Québec/Canada
Posts: 614
Default

A faster way... You can change Destination Cell with any kind of range...

Code:
Sheets("ImportData").Cells.Copy Sheets("RawData").Cells
__________________
J a m i r e z

There are 10 type of people. Those which understand binary and those which do not understand it.
Reply With Quote
  #3  
Old 04-21-2004, 08:48 AM
Kibbs Kibbs is offline
Freshman
 
Join Date: Apr 2004
Posts: 29
Default

Great stuff Jamirez, thanks!!

Wayne
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
save as coding newtovb99 Excel 8 03-30-2004 03:46 PM
Seemingly silly issue, sheet copy hloos Excel 7 01-16-2004 03:19 PM
copy a row from one excel sheet to another using vb code nubee Excel 2 08-13-2003 09:44 AM
copy date from sheet and rename sheet gumby Word, PowerPoint, Outlook, and Other Office Products 2 02-19-2003 12:52 PM
Hekp Importing Excel JonM Word, PowerPoint, Outlook, and Other Office Products 2 05-01-2002 09:45 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->