LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Functions 101 The basics

IMO UDTs are a good idea, but badly implemented in VB.

Very well put. I never use UDTs except when required by an API call. The
limitations on use UDTs with Collections and For Each loops make the barely
useful. I always use classes instead.

A Collection or Array of Class instances is much more manageable and
flexible than UDTs.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)

"Bob Phillips" wrote in message
...
IMO UDTs are a good idea, but badly implemented in VB. If you are a
serious VB programmer, arrays are one of your basic tools, so handling
them should be meat and drink.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Martin Fishlock" wrote in message
...
Well I would actually prefer to return a user defined type (UDT) but I
didn't
really want to bring in UDT for a discussion on functions. It is a little
safer than arrays.

Arrays are fine but you then have to process them and deal with limits
etc.
But in some situations an array would be useful like split a line of text
into words.
--
Hope this helps
Martin Fishlock, Bangkok, Thailand
Please do not forget to rate this reply.


"Bob Phillips" wrote:

"Martin Fishlock" wrote in message
...

certain cicrmustances more than one variable is returned and then you
need to use globals or byref (like pointers in c(++)) so I could write
a
function

function splitinhalf(byval s as string, byref s1 as string, byref s2
as
string) as boolean

and this function whould split the string s in half and put the
answers in
s1 and s2 and return true on success and false otherwise.


or the function could return an array







 
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
basics? n21 New Users to Excel 7 September 21st 06 12:37 PM
QueryTable Basics.. thiaga Excel Programming 0 March 9th 06 02:42 PM
Hi I'm New and need help with Excel Basics abi Excel Discussion (Misc queries) 10 November 23rd 05 07:25 PM
VBA form basics Colin Foster[_4_] Excel Programming 0 August 4th 05 12:29 PM
Free books on Charting, Basics, Data Management, Functions; Free Add-In "Excel Usability Enhancer" VJ[_3_] Excel Programming 0 December 11th 03 09:01 AM


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