I have an array set up to receive the names of forms when they open. The form name is sent as a Form not a String therefore when I run my code I cannot check for whether the field is empty in the normal way (ie. array(1) = "") as the "" are only usable with strings!

Dim Forms(24) As Form
Dim i As Integer
Dim Free As Integer = -1

  If Forms(i) =  Then
    Free = CInt(i)
  End If
Loop Until Free <> -1

I only need a solution to do the same as array(1)="" but for windows forms.

Thanks for the help!

Recommended Answers

All 2 Replies

If Forms(i) Is Nothing Then

Works perfectly, as usual with this brilliant forum!

Thanks for the help, it's really boosting my along with my computing coursework as waiting for tutors to reply is lonnnggg... :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.