Wrox Programmer Forums
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 19th, 2010, 06:11 PM
Registered User
 
Join Date: May 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel VBA.....

I'm trying to speed up this code, any ideas???

ThisWorkbook.Sheets("TSC").Range("1:10").Calculate

Sheets("TS1").Select
ActiveCell.EntireRow = Sheets("TSC").Rows("4:4").Value

Sheets("TS2").Select
ActiveCell.EntireRow = Sheets("TSC").Rows("6:6").Value

Sheets("TS3").Select
ActiveCell.EntireRow = Sheets("TSC").Rows("8:8").Value

Sheets("TS4").Select
ActiveCell.EntireRow = Sheets("TSC").Rows("10:10").Value
 
Old May 20th, 2010, 07:50 AM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Try

Sheets("TS1").Range("A1").EntireRow = Sheets("TSC").Rows("4:4").Value.

Also you can set some properties (http://vbadud.blogspot.com/2007/04/i...rformance.html)

Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)





Similar Threads
Thread Thread Starter Forum Replies Last Post
#NAME? error running Excel 2003 VBA in Excel 2007 steveburn Excel VBA 0 October 24th, 2009 08:47 AM
Help! Conversion Excel 2003 VBA codes to Excel 2007 sunny76 BOOK: Excel 2007 VBA Programmer's Reference ISBN: 978-0-470-04643-2 0 August 13th, 2009 05:38 AM
Code works in Excel VBA but not Access VBA fossx Access VBA 2 May 21st, 2007 08:00 AM
Converting excel data to Access using excel VBA ShaileshShinde VB Databases Basics 1 April 26th, 2006 07:57 AM
Excel VBA to SQL & back to VBA edesousa Excel VBA 1 June 1st, 2004 02:39 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.