Porting Excel/VBA to Calc/StarBasic

Porting Excel/VBA to Calc/StarBasicAlthough OpenOffice 1.1 Calc is able to read Microsoft Excel workbooks, compatibility extends primarily to functionality found in worksheets. Excel workbooks with Visual Basic for Applications (VBA) macros embedded do not function in Calc, even though VBA and StarBasic (SB) are syntactically the same. The reason Excel/VBA workbooks do not work under Calc/SB is due to the differences in the underlying object models for Excel and Calc. The intent of this document is to show, by way of examples, how to port VBA macros accessing Excel objects to the equivalent SB macros accessing Calc objects. This manual is written from the perspective of an experienced Excel/VBA programmer. Hence the reader is assumed to know the VBA language and is familiar with the MS Excel Object Model. This document is not a tutorial on SB.
Read more

Using Visual Basic for Applications Code

The native programming language for Microsoft Office
More powerful and flexible alternative to macros
Ch 10: attached a macro to a command button user clicks button
Click event occurs
macro runs
Read more