I'm trying to make a standardized process for updating a particular worksheet. I want no user control except for the functions I give them. To do that I have locked sheets and then forms that load with certain macros. One form is designed to remove data from the sheet. It works fine as written and tested, but I've tried to update it so that if you open it without any relevant data to remove, it spits out a dialogue box and then uses Unload Me to close the form. This closes the form but then excel throws an error:

> 
> Run-time error '91': Object variable or With block variable not set
> 
> 
> 

The form is loaded from a module that only has the one line:

```
MyForm.Show

```

This is where excel is throwing the error from. On initialization of the form, a combobox is filled with values based on the data in the sheet. If the combobox is empty after loading, the form is supposed to throw the dialogue box and then close.

```
If ComboBox.ListCount = 0 Then
    MsgBox "No Data"
    Unload Me
End If

```

How can I perform the check on load without having the error thrown from the Module?