LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VB Efficiency: Inserting a Row

My VB code takes an absurd amount of time to execute after I ha
expanded the code slightly. Reading previous posts, I think one of th
bottle necks is the "Activate" function I use. I have posted the cod
below and would appreciate any help on how to make the code mor
efficient. I was also wondering where other obvious bottlenecks t
consider. Thanks!

============
Public Function insert_row(orig_row, dest_row) As Integer
Range("A" & orig_row & ":N" & orig_row).Select
Range("B" & orig_row).Activate
Selection.Cut
Range("A" & dest_row & ":N" & dest_row).Select
Range("B" & dest_row).Activate
Selection.insert Shift:=xlDown
End Function

===========

--
Message posted from http://www.ExcelForum.com

 
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
Equation Efficiency? Ithaca Excel Worksheet Functions 1 April 29th 09 01:20 AM
Calculation Efficiency (Speed)? Ken Excel Discussion (Misc queries) 2 October 29th 07 12:00 PM
Range efficiency Steven Excel Worksheet Functions 0 December 9th 05 02:15 PM
Excel formulas efficiency Al Jager Excel Programming 3 February 7th 04 03:48 PM
.select efficiency Lawlera Excel Programming 4 February 4th 04 02:38 PM


All times are GMT +1. The time now is 01:57 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"