Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 507735
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:50:06+00:00 2026-05-13T06:50:06+00:00

So I’m creating a Activation class for a VB6 project and I’ve run into

  • 0

So I’m creating a Activation class for a VB6 project and I’ve run into a brain fart. I’ve designed how I want to generate the Serial Number for this particular product in a following way.

XXXX-XXXX-XXXX-XXXX

Each group of numbers would be representative of data that I can read if I’m aware of the matching document that allows me to understand the codes with the group of digits. So for instance the first group may represent the month that the product was sold to a customer. But I can’t have all the serial numbers in January all start with the same four digits so there’s some internal math that needs to be done to calculate this value. What I’ve landed on is this:

A B C D = digits in the first group of the serial number
(A + B) – (C + D) = #

Now # would relate to a table of Hex values that would then represent the month the product was sold. Something like…

1 – January

2 – February

3 – March

….

B – November

C – December

My question lies here – if I know I need the total to equal B(11) then how exactly can I code backwards to generate (A + B) – (C + D) = B(11)?? It’s a pretty simple equation, I know – but something I’ve just ran into and can’t seem to get started in the right direction. I’m not asking for a full work-up of code but just a push. If you have a full solution available and want to share I’m always open to learning a bit more.

I am coding in VB6 but VB.NET, C#, C++ solutions could work as well since I can just port those over relatively easily. The community help is always greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T06:50:06+00:00Added an answer on May 13, 2026 at 6:50 am

    There’s no single solution (you have one equation with four variables). You have to pick some random numbers. Here’s one that works (in Python, but you get the point):

    from random import randint
    
    X = 11 # the one you're looking for
    
    A_plus_B = randint(X, 30)
    A = randint(max(A_plus_B - 15, 0), min(A_plus_B, 15))
    B = A_plus_B - A
    
    C_plus_D = A_plus_B - X
    C = randint(max(C_plus_D - 15, 0), min(C_plus_D, 15))
    D = C_plus_D - C
    

    I assume you allow hexadecimal digits; if you just want 0 to 9, replace 15 by 9 and 30 by 18.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 407k
  • Answers 407k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You can do this: $('.textbox1, .textbox2, .textbox3').each(function() { foo(this); });… May 15, 2026 at 6:20 am
  • Editorial Team
    Editorial Team added an answer Its difficult for me to answer this question because I… May 15, 2026 at 6:20 am
  • Editorial Team
    Editorial Team added an answer Take a look at Typed Reflector, which is a simple… May 15, 2026 at 6:20 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.