10/02/2008

How to : use VBA in openoffice calc

insert "Option VBASupport 1" at the first line of macro module.
for example,

Option VBASupport 1

sub main()

msgbox "Now testing VBA macro..."
range("A1").select
selection.value = "This is A1"
selection.offset(1, 0).select
selection.value = "Offset (1, 0) from A1"
selection.offset(1, 2).value = "Offset(1, 2) from selection"
msgbox "VBA testing's completed"

end sub
It works.
Maybe some basic & simple VBA code will do.
More complicated codes wont work I guess.

댓글 없음: