Xool,
To auto load the form:
Open the VBA editor and doucle-click on This Workbook icon under your
workbook project in the project explorer window (left opart of screen). Now
go to the left of the two drop-down boxes just above the editor area, where
it reads (General), and select Workbook.You should automatyically get the
following procedure start and end lines:
Private Sub Workbook_Open()
End Sub
All you need to do is paste the following two lines of code in between, to
open the form:
Load FormName
FormName.Show
(changing FormName to the actual name of your form).
To close the workbook together with the form, put this code in the command
button's on_click event:
ActiveWorkbook.Close (you will be prompted to save changes, if any), or
ActiveWorkbook.Close True (save and close), or
ActiveWorkbook False (close without saving).
HTH,
Nikos