I tried to get help last week and it didn't quite solve the problem. So - now I have a new approach that doesn't work. I'm trying to add cell values to a collection. But, I keep getting the error that the subscript is out of range. Here is my code:
Private Sub UserForm_Activate()
Dim EmptyCells As New Collection
Dim Inst As New Class1
Dim txtNoVal, Name1, cell
cell = Application.Worksheets("Sheet1".Range("d25".Value
'this is what gets the error
If IsEmpty(cell) = True Then
txtNoVal = "Facility Request sheet, cell D25, Date Facilities are required"
End If
Inst.InstanceName = txtNoVal
EmptyCells.Add Item:=Inst
Set Inst = Nothing
thanks!
Private Sub UserForm_Activate()
Dim EmptyCells As New Collection
Dim Inst As New Class1
Dim txtNoVal, Name1, cell
cell = Application.Worksheets("Sheet1".Range("d25".Value
'this is what gets the error
If IsEmpty(cell) = True Then
txtNoVal = "Facility Request sheet, cell D25, Date Facilities are required"
End If
Inst.InstanceName = txtNoVal
EmptyCells.Add Item:=Inst
Set Inst = Nothing
thanks!