

It seems so limiting that when you have a reasonably nice way to do a macro, but can't actually use cells the same way you can from the spreadsheetįunctions directly. It's a shame there's no easier way inside a basic macro to tell is the value of the cell passed into the function is blank, 0, true, false, etc without jumping So instead of having =MyPoints(A2,B2,C2, E2, G2) replicated down the sheet for each match, I'd just loop through the entire spreadsheet inside one function. Thinking about it more, it might make more sense to just expand the function so that it loops over all the fields in the sheet, looking for data and then posting the results back asįound. But I'm not sure this is going to work for me because I need to use this formula for each and every game the teams play over a season. A basic macro would be much simpler to deal with. currently I have a monster in-cell function using 'if(isblank(C3).) which gets crazy hard to keep track of when I'm looking at five columns. So I want to have a function which does all this. I guess I could just score a forfeit as a -1 score, but it's simpler to have a column explicity defined. It gets more complicated since I also have to take into account Coed status and forfeits. But once I have to scores, I can them go and compute the real points to be assigned to a team. So if I put in a 2 for my team's score, but the other team's score is still blank (empty, null, whatever) then the score is zero. I don't want to assign a score to a team until I have both the team's score and a score entered for the opponent. So without opening up a new sheet and trying to figure out the location of the cell being passed into the sheet, how do I do this?Īnd just to explain, I'm trying to score soccer matches. So then I tried to see if I could use kingfisher's suggestions to access cell properties, but I'm not sure I can do this, because as I have been reading, the arguements passed into a basic macro function are just the values of the referenced field, not the address of the field itself. Upgrading if need be since I'll be getting a new computer one of these days.įunction CellIsBlank(X As Object) As BooleanĬellIsBlank = (X.Type = .CellContentType.EMPTY) I'm running this inside a Calc spreadsheet from OpenOffice 3.1.1 on Linux RHEL 5.7 32bit, if that makes a difference. More detailed information on applying more complex regular expression conversions can be found here.Thank you for your quick reply, but I just tried out the =CellIsEmpty(C22) and all I get back is a "False" result and an error popup which says: $1 is will be replaced by the content of the first instance. Note that the $ signs followed by the numbers in the OO Basic Format represent the order of the. OO Basic Format: ThisComponent.CurrentController.
#Openoffice basic macros code#
In order to use regular expressions effectively it is best to illustrate with a existing code pair as an example. VBA Code Pattern:Ĭode snippets should be at the lowest level of granularity possible meaning that VBA code should be split into the smallestĬomponents possible and still have an OpenOffice Basic equivalent.

All submissions willīe reviewed before inclusion. Read the instructions below before submitting. In the appropriate place of the OpenOffice Basic equivalent. Placeholders so that references to objects can be retained and placed TheĬonversion process executes regular expressions of the VBA code with Of VBA to OpenOffice code pairs used for the conversion process. You are encouraged to submit your own code snippets to add to the database Submit VBA to OpenOffice Basic Code Conversion Snippets With open source code as an example of an Excel VBA project migrated Yield to Maturity Calculator in both Excel VBA and OpenOffice Basic
#Openoffice basic macros free#
Business Spreadsheets also offers the free Bond

To find assistance, make suggestions or share experiences about usingįorum. VBA to OO Basic code snippet pairs can be viewed here. Such snippets here in a community effort to strengthen the results of Users of the converter are encouraged to submit VBA and OO Basic with place holders so that replacements can be made The Excel VBA to OO Calc Basic Converter uses code snippet pairs of Migrations from Microsoft Excel to OpenOffice or Star Office Calc. Reference should be made to the material for PortingĮxcel/VBA to Calc/Star Basic at when undertaking

The converter may also serve as a learning mechanism to better understand the similarities and differences between the VBA and OO Basic coding specifications. This Excel VBA to OpenOffice Basic converter offers a starting point for migrating VBA projects in Excel to the OpenOffice or Star Office Calc application. While much of the underlying logic behind OpenOffice Basic compares to that of Visual Basic for Applications, there exists fundamental differences to the way the code is constructed.
