Mohammad Ishaq
Member
I have an excel vba user from .I want auto generated unique number in one of the text box on my user form . I want that when i click the save button , the number transfer my sheet.For this i write the following code but it gives the number again and again.I require the unique no.Please some one help me to correct my code to get unique no.
Code:
Dim Low As Long
Dim High As Long
Dim r As Long
Low = 1
High = 9999
r = Int((High - Low + 1) * Rnd() + Low)
TextBox9.Text = r