generating random number as template

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to create a form in excel that generates a unique number for each
form. If anyone can assist with the best way to do this it would be great.
 
What you need is a Forms collection object, but in Excel that will only work
for already loaded forms.
So first create the collection yourself, and then browse through it.

Sub CheckFormsInCollection()
Dim i, u As Long, s As String
Load Form1
Load Form2
Load Form3
u = UserForms.Count - 1
For i = u To 0 Step -1
s = s & UserForms(i).Name & vbNewLine
MsgBox s
Next
End Sub
 

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