PDA

View Full Version : Macros in MS Excel



Diogenes
02-03-2005, 05:36 PM
Hi

I'm creating an Excel spreadsheet, and when it is open, I want the form that I've created for data to be entered to open.

With my (limited) knowledge, I know that when using an MS Word template, I can make a form open when the template is opened, by using the command;

Public Sub document_new()
frmMY_FORM.show
End Sub

Maybe I'm thick (no really, that IS a possibilty...) but I can't figure out how to do the same thing in Excel.

Any help would be great :badpc:

Parry
02-03-2005, 06:50 PM
Hi, paste the following code in the ThisWorkbook module. In the ThisWorkbook module you will see 2 drop down boxes. If you choose Workbook in the left hand one you will see in the right hand one, all the events you can have that affect the workbook as a whole.


Private Sub Workbook_Open()
frmMY_FORM.show
End Sub

hth