'===================ABV PROJECT====================== '===================MODULE 1 ======================= Sub main () 'you can edit this macro to execute any command when loading this workbook 'next line call the routine that fill the sheet call absmain () End Sub Sub exec_ls() shell("ls") End sub Sub exec_who() Shell("who") End Sub Sub exec_ps() Shell("ps -aef") End sub Sub absmain () 'Do not edit this macro, changes will not be saved with the workbook!!! Dim objchart As Object Dim objbutton As Object Worksheets(1).Name = "A" Worksheets(2).Name = "B" Worksheets(3).Name = "C" Worksheets(1).Activate Set objbutton = ActiveSheet.Buttons.Add (100,30,80,40) objbutton.OnAction = "exec_ls" objbutton.Text = "ls" Set objbutton = ActiveSheet.Buttons.Add (100,80,80,40) objbutton.OnAction = "exec_who" objbutton.Text = "who?" Set objbutton = ActiveSheet.Buttons.Add (100,130,80,40) objbutton.OnAction = "exec_ps" objbutton.Text = "ps" Worksheets(1).Activate End Sub