MagnumXL Posted February 12, 2008 Share Posted February 12, 2008 I honestly did search for an answer to this.I know it should be simple and that the solution is probably staring me in the face.I need to return the number of fields there are in an array as a variable. Ultimately (where the need comes from) I need to know how many Fields (Columns) there are in an Access table. But i can already return the table in an array so either answer would really help me. Thank you in advance. Link to comment Share on other sites More sharing options...
Valuater Posted February 12, 2008 Share Posted February 12, 2008 $Array_Count = UBound($array) see help 8) Link to comment Share on other sites More sharing options...
MagnumXL Posted February 12, 2008 Author Share Posted February 12, 2008 Awesome, thank you! I guess i dont feel too bad now. Whats the logic behind calling this "UBound"? Link to comment Share on other sites More sharing options...
randallc Posted February 12, 2008 Share Posted February 12, 2008 Awesome, thank you! I guess i dont feel too bad now. Whats the logic behind calling this "UBound"?Hi,For number columns; $Array_Count = UBound($array,2)See helpfile;Best, randall ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Valuater Posted February 12, 2008 Share Posted February 12, 2008 Welcome! and ...I dont know why! maybe, if you are going to use ubound() you might want to use ubound() -1 Remember that the value returned by UBound is one greater than the index of an array's last element! 8) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now