Add Random number to end of Substring value

How can I append a random number to the end of my substring?

 strHeaderID = InputColumn.Substring(32, 2) & Rand
LVL 1
dba123Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

maidinhtaiCommented:
Hi. You can use this code:
       Dim x As Random = New Random
        Me.TextBox1.Text = x.Next() 'Create a random number
Read more in http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemRandomClassTopic.asp

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
maidinhtaiCommented:
In your case, this is one of solution:
strHeaderID = InputColumn.Substring(32, 2) & (New Random).Next()
dba123Author Commented:
is there a simple random function I can use....I need to wrap it with a Cint().  This is a bit more than I need.   I just need a quick simple rand number...about maybe 6 digits long (int)
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

dba123Author Commented:
oh, ok..hold on, I see...
dba123Author Commented:
maidinhtai, is there a way to substring that x.Next to pull out maybe just 6 numbers from the randomly created number?
maidinhtaiCommented:
I think you have found the answer :D.
strHeaderID = InputColumn.Substring(32, 2) & (New Random()).Next(999999)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.