excel crashes on exit since adding a form.

  • Thread starter Thread starter Peter Bailey
  • Start date Start date
P

Peter Bailey

I have a simple form with two drop down boxes and the user selects from the
list.

the form is opened here:

Private Sub Workbook_Open()
FrmGetInitialData.Show
End Sub

and initialised here and given its conncetion to two cells in the worksheet
here:

Private Sub UserForm_Initialize()
Me.CBCentre.ControlSource = "AuditChecklist!c4"
Me.CBStaffName.ControlSource = "AuditChecklist!P4"
End Sub

and closed here:
Private Sub BtnOK_Click()
Me.Hide
End Sub

it puts the data from the drop down boxes into the cells perfectly but when
I save the spreadsheet it causes an error and wants to send an error report
to microsoft.

can you guys see anything obvious here?

regards in advance

Peter
 
The problem is that you don't close the form but hide it. Use
Unload FrmGetInitialData
instead of
FrmGetInitialData.hide or Me.hide

- Manges
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top