Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Edi Edi is offline
external usenet poster
 
Posts: 9
Default get_Range Restrictions..

Hi,

Im using the get_Range function on the worksheet object
givning it two parameters : ex. get_Range("A1, A2,...Ln", Missing)

the problem is that when the number of elements in the string (sperated by
',')
is larger than 100~ im getting a com exception

any idea why is that?

thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default get_Range Restrictions..

Might have something to do with the length of the string/argument being
longer than 255 characters.

--
Regards,
Tom Ogilvy

"Edi" wrote in message
...
Hi,

Im using the get_Range function on the worksheet object
givning it two parameters : ex. get_Range("A1, A2,...Ln", Missing)

the problem is that when the number of elements in the string (sperated by
',')
is larger than 100~ im getting a com exception

any idea why is that?

thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,119
Default get_Range Restrictions..

Being that get_Range is not a standard function in Excel VBA I can only give
you my best guess here. The string you are attempting to pass is in excess of
256 characters and that is causing a problem. You can try concatenating two
strings together instead of passing one long one.
--
HTH...

Jim Thomlinson


"Edi" wrote:

Hi,

Im using the get_Range function on the worksheet object
givning it two parameters : ex. get_Range("A1, A2,...Ln", Missing)

the problem is that when the number of elements in the string (sperated by
',')
is larger than 100~ im getting a com exception

any idea why is that?

thanks

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default get_Range Restrictions..

Edi
what about
get_Range("A1:A1000",missing);
and then pick out the ones you want in code

As well as the possible 255 char limit (may be 1024 - you need to check the
doco for your target Excel) there may be a possible issue with the 30
argument limit -but if you are upto 100 elements probably not in your case.
Could also be creating a range union with too many elements?
Hard to know without seeing more code

BTW
How do you find C# performance?
I've not been overly impressed so far

cheers
Simon

"Edi" wrote:

Hi,

Im using the get_Range function on the worksheet object
givning it two parameters : ex. get_Range("A1, A2,...Ln", Missing)

the problem is that when the number of elements in the string (sperated by
',')
is larger than 100~ im getting a com exception

any idea why is that?

thanks

  #5   Report Post  
Posted to microsoft.public.excel.programming
Edi Edi is offline
external usenet poster
 
Posts: 9
Default get_Range Restrictions..

Thanks for all your answers

I guess the problem might be in the number of characters as you
All suggested I had found that I can put no more than 200~ characters
Into my get range function ... the problem is that this function is much
faster than
Excel.Application.Union (range1, range2) so Im mixing both
Such that Im assigning 200 chars for the get_Range function and union it
with another 200
Characters..

Well I guess I will have to live with it :)

BTW Simon, Ive not been impressed at all
With the performance in c# after more than a year working with it.
Hope that vesto2 will improve it

Edi


"Simon Murphy" wrote:

Edi
what about
get_Range("A1:A1000",missing);
and then pick out the ones you want in code

As well as the possible 255 char limit (may be 1024 - you need to check the
doco for your target Excel) there may be a possible issue with the 30
argument limit -but if you are upto 100 elements probably not in your case.
Could also be creating a range union with too many elements?
Hard to know without seeing more code

BTW
How do you find C# performance?
I've not been overly impressed so far

cheers
Simon

"Edi" wrote:

Hi,

Im using the get_Range function on the worksheet object
givning it two parameters : ex. get_Range("A1, A2,...Ln", Missing)

the problem is that when the number of elements in the string (sperated by
',')
is larger than 100~ im getting a com exception

any idea why is that?

thanks

Reply
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
Restrictions in format juanpablo Excel Discussion (Misc queries) 1 April 27th 10 06:15 PM
RESTRICTIONS YESHWANT JOSHI Excel Discussion (Misc queries) 5 May 26th 09 05:02 PM
Excel help and AD GPO restrictions javagirl Excel Discussion (Misc queries) 2 April 2nd 07 09:14 PM
Sheet Restrictions Office Jnr Excel Discussion (Misc queries) 2 January 23rd 07 11:59 AM
How to do look up with restrictions JackR Excel Discussion (Misc queries) 3 April 3rd 06 01:12 AM


All times are GMT +1. The time now is 12:14 AM.

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

About Us

"It's about Microsoft Excel"