Monday, March 06, 2006

objects

I don't know if I just didn't know enough Visual Basic to make full use of objects. However, I'm finding that it's natural to change the find-something-or-other functions that I wrote to return an object instead of a boolean and then to check the object to see if it has the characteristic (such as the right string value) that I was searching for. (The FindFirst function that comes with OOo Basic returns an object -- a cell -- if the search was successful.) I'm also finding that I'm not creating temporary range names (as I did in VB) but instead just using oCell= or oRange= .
On another vein, I also find I'm liking using the Input function followed by a MsgBox function that says in effect "Are you sure?" as recommended in the Help info for Input function.

Friday, March 03, 2006

sorting

I was reading the OpenOffice forum message boards and saw a question about sorting on more than 3 categories. I haven't joined the forum since I know very little about Basic but thought I'd at least write down my thoughts somewhere. To sort on, say, 5 categories, first sort on the last two then sort the result on the first 3.
Finally, I'm finding that it isn't as hard as I thought to rewrite macros from Visual Basic to OOo Basic. There are a few differences to keep one on one's toes, of course. A few of the provided macro functions are different (like IFF instead of IF for the function). The workbook functions are mostly the same -- except for using semicolons instead of commas to separate elements.