Registration Form in VBA?

D

Desmond777

Has anyone here ever had a program that lets you try the free version until
you buy the full version? You get a serial code that you have to enter to
unlock the full functions of the program. I want to have something like that
in my game.
--------------------------------------
I want the user to click a Command Button

It then looks for a text file in the same directory as the ppt.

It checks the txt for the exact code "vi5riwehrv8n323yr32y3v8Hq34yvb" if the
txt file says something else it will take you to slide 3 (Free Trial)

If it does say "vi5riwehrv8n323yr32y3v8Hq34yvb" then it will take you to
slide 2 (Registered)
--------------------------------------
Somewhere else in the ppt i want to have a text box and a command button.

If the button is pressed and the text field says "2473 4729 4734 5923" then
it should alter the txt file (or save over it) with a new text that says
"vi5riwehrv8n323yr32y3v8Hq34yvb"

If the text field has something different written into it then it should
show a message saying "Try Again"
 
D

David M. Marcovitz

This seems pretty easy with VBA, but I'm not sure how secure it would
be. You might want to include tests at other times in the game to make
sure they didn't find another way to get to slide 2.

If you go to my site:

http://www.PowerfulPowerPoint.com/

and click on "More Tricks," you can look at the first couple of examples
that involve writing information to a text file. Reading and writing the
info to a text file seems like the hardest part. The rest is a simple IF
statement.

--David
 
D

Desmond777

Thanks a lot David! I'll give it a try.

David M. Marcovitz said:
This seems pretty easy with VBA, but I'm not sure how secure it would
be. You might want to include tests at other times in the game to make
sure they didn't find another way to get to slide 2.

If you go to my site:

http://www.PowerfulPowerPoint.com/

and click on "More Tricks," you can look at the first couple of examples
that involve writing information to a text file. Reading and writing the
info to a text file seems like the hardest part. The rest is a simple IF
statement.

--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
D

Desmond777

Edit: It worked exactly like I want it now all I need is some code that
checks the txt file for the "Magic Numbers" and determines which slide to go
to.
 
J

John Wilson

Try this sort of thing (make sure text file has only one line)

Sub checktext()
Dim checkserial As String
Dim sFile As String
Dim Ifilenum As Integer
sFile = "C:/text.txt" ' change this to suit
Ifilenum = FreeFile()
Open sFile For Input As Ifilenum
Line Input #Ifilenum, checkserial
If checkserial = "xxxxx" Then
'do whatever
Else
'do something else
End If
End Sub
--
Amazing PPT Hints, Tips and Tutorials

http://www.PPTAlchemy.co.uk
http://www.technologytrish.co.uk
email john AT technologytrish.co.uk
 

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

Top