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: 40
Default Any quicker ideas?

Hi everyone,

I'm using the following code to check a range exists on a worksheet:

Public Function RangeExists(rangeName As String) As Boolean
Dim var As Variant

RangeExists = False
On Error GoTo BadRange
If rangeName < "" Then
var = Range(rangeName)
RangeExists = True 'will raise error where range does not exist
'therefore to get here, it must
Exit Function
End If

BadRange:
End Function

and it works fine. The trouble is I call this function about 34000 times and
it takes approx 14 seconds to run.

Any ideas for a faster way to check a range exists?

TIA
big t


 
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
looking for a function to make it more quicker Darius Excel Worksheet Functions 1 September 25th 07 12:45 AM
How do I get files to open quicker jack Excel Discussion (Misc queries) 0 September 6th 06 01:22 AM
Is there a shorter/quicker way to do this? SouthAfricanStan Excel Worksheet Functions 1 June 27th 06 04:34 PM
Cell problems - need a quicker way. lara5555 Excel Worksheet Functions 2 January 13th 06 01:00 PM
shared workbook see changes quicker jdengel Excel Programming 0 May 13th 04 08:06 PM


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