Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Attn Alan Bedan re arrays

I am selecting a table on a worksheet, making it active and then using
the Selection.array (I did find how to do this in the help files a few
days ago BUT didn't make a note of it, now I cannot find it again.)
I though it was 'Selection.array'

Gary\0\0\0\0\0
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Attn Alan Bedan re arrays

see your original post for an example.

--
Regards,
Tom Ogilvy

"Gary" wrote in message
d.com...
I am selecting a table on a worksheet, making it active and then using
the Selection.array (I did find how to do this in the help files a few
days ago BUT didn't make a note of it, now I cannot find it again.)
I though it was 'Selection.array'

Gary



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Attn Alan Bedan re arrays

Dim vArr as Variant
vArr = Selection.Value
for i = 1 to ubound(varr,1)
for j = 1 to ubound(varr,2)
msgbox "vArr(" & i & ", " & j & ")=" & vArr(i,j)
next
next

--
Regards,
Tom Ogilvy
"Gary" wrote in message
d.com...
I am selecting a table on a worksheet, making it active and then using
the Selection.array (I did find how to do this in the help files a few
days ago BUT didn't make a note of it, now I cannot find it again.)
I though it was 'Selection.array'

Gary



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Attn Alan Bedan re arrays

It pointed me in the right direction, At least of got a starting point
thankyou (some of the bits in there I didnt understand (Why the &
signs?)
and Does it need to be called vArr could I call it somethin like Groups?

Thankyou for your help so far

Gary


In article m,
says...
I am selecting a table on a worksheet, making it active and then using
the Selection.array (I did find how to do this in the help files a few
days ago BUT didn't make a note of it, now I cannot find it again.)
I though it was 'Selection.array'

Gary\0\0\0\0\0

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Attn Alan Bedan re arrays

You can call it anything you want as long as you dim it as variant as shown.

The ampersands build a string to help you see what is contained in each
element of the array. It has nothing to do with functionality. It is an
example. All you need is

Dim Groups as Variant
Groups = Selection.Value

Assuming Selection is a single area range.

--
Regards,
Tom Ogilvy


"Gary" wrote in message
...
It pointed me in the right direction, At least of got a starting point
thankyou (some of the bits in there I didnt understand (Why the &
signs?)
and Does it need to be called vArr could I call it somethin like Groups?

Thankyou for your help so far

Gary


In article m,
says...
I am selecting a table on a worksheet, making it active and then using
the Selection.array (I did find how to do this in the help files a few
days ago BUT didn't make a note of it, now I cannot find it again.)
I though it was 'Selection.array'

Gary





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Attn Alan Bedan re arrays

Gary wrote:
I am selecting a table on a worksheet, making it active and then using
the Selection.array (I did find how to do this in the help files a few
days ago BUT didn't make a note of it, now I cannot find it again.)
I though it was 'Selection.array'

Gary


You didn't articulate what it is you're trying to do. Did Tom Ogilvy's
second post in this thread solve your problem?

Alan Beban
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Attn Alan Bedan re arrays

Tom Ogilvy wrote:

You can call it anything you want as long as you dim it as variant as shown.

The ampersands build a string to help you see what is contained in each
element of the array. It has nothing to do with functionality. It is an
example. All you need is

Dim Groups as Variant
Groups = Selection.Value

Assuming Selection is a single area range.

And if Selection is a multi-area range, if the functions in the freely
downloadable file at http://home.pacbell.net/beban are available to your
workbook and you are using Excel 2000 or later

Dim Groups()
Assign Selection, Groups

will load the value from the selected range into a one-dimensional
array, Groups.

Alan Beban
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
Importing Alan Beban's code on Arrays; Importing a module or a project Steve G Excel Worksheet Functions 4 August 27th 07 04:18 PM
Has anyone used arrayfunctions from Alan Beban? SteveT Excel Worksheet Functions 3 February 26th 07 07:52 AM
VlookupS-Alan Beban Deeds Excel Worksheet Functions 4 December 20th 05 12:03 AM
Problem with Alan Beban's ResizeArray RB Smissaert Excel Programming 3 January 29th 04 11:46 PM


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