Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Menus and Toolbars / December 2005

Tip: Looking for answers? Try searching our database.

Help Needed With Arrays and Passing Arguments (if that is even the correct terms)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg Maxey - 03 Dec 2005 17:56 GMT
Jonathan West posted the following for my benefit:

"Greg, As for getting a max from an array, something like this should work

Function MaxOfArray(vArray() as Variant) As Variant
Dim iStart as Long
Dim iEnd as Long
Dim vMax as Variant
Dim i As Long

iStart = LBound(vArray)
iEnd = UBound(vArray)
vMax = vArray(iStart)
For i = iStart + 1 to iEnd
 If vArray(i) > vMax Then vMax = vArray(i)
Next i
MaxOfArray = vMax
End Function"

I really need help understanding arrays, passing arguements, and in
particular the understanding the empty parens "()" in Jonathans code (e.g.
vArray() As Variant).

Lets say I have the following numbers "1  99.99 -34.3 and 50" and I want to
"pass" them to Jonathans function to get a returned answer of "99.99."

What would the approptiate calling statement be?  How is (vArray() As
Variant)
determined?

All help appreciated.  Thanks.

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

Suzanne S. Barnhill - 03 Dec 2005 18:49 GMT
Would one of the word.vba NGs be more appropriate for this?

Signature

Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

> Jonathan West posted the following for my benefit:
>
[quoted text clipped - 27 lines]
>
> All help appreciated.  Thanks.
Greg Maxey - 03 Dec 2005 19:02 GMT
Yep.  That is why I tried to cancel it an apologized for double posting when
I reposted in the VBA general group.

Signature

Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.

> Would one of the word.vba NGs be more appropriate for this?
>
[quoted text clipped - 37 lines]
>> http://gregmaxey.mvps.org/word_tips.htm
>> For some helpful tips using Word.
Suzanne S. Barnhill - 03 Dec 2005 23:09 GMT
Okay. Since I don't do VBA, I don't read any of the word.vba NGs.

Signature

Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

> Yep.  That is why I tried to cancel it an apologized for double posting when
> I reposted in the VBA general group.
[quoted text clipped - 40 lines]
> >> http://gregmaxey.mvps.org/word_tips.htm
> >> For some helpful tips using Word.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.