954,535 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Check an Array Field is Empty when Type = Form

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

Do
  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!

Formby
Newbie Poster
10 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
 
If Forms(i) Is Nothing Then
codeorder
Posting Virtuoso
1,913 posts since Aug 2010
Reputation Points: 255
Solved Threads: 384
 

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... :)

Formby
Newbie Poster
10 posts since Apr 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: