VBA? Visual Basic for Applications - most macros use this as the're language.
Right click in your Business Objects toolbar, select Visual Basic Toolbar, click on the white box with the bluetop and red bit coming out of top (Visual Basic Editor)
The code goes into a window on the right hand side of the visual basic editor.
You need to insert the code into a sub routine, you can make your own or use one of the docuement event ones....
The above code seems to save the report as a BO report as opposed to converting it to excel.
A basic rundown of what my coding does
dim doc as document
dim rep as report
declares two variables one relating to a document one relating to a report
set doc and set rep declares what these variables should be
Rep.ExportAsText ("Filepath\Filename" + ".xls"

exports the document as text but because of the.xls tag the information is put into a spreadsheet (text delimited)