Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2012, 10:59:49 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  VB and the development of wizards
| | |-+  Input Box Function
Pages: 1   Go Down
Print
Author Topic: Input Box Function  (Read 867 times)
0 Members and 2 Guests are viewing this topic.
Greolt
Global Moderator
*
Offline Offline

Posts: 872


View Profile
« on: March 28, 2009, 11:58:33 PM »

I found this on the Cypress Enable Language document.

Sub Main ()
  Title$ = "Box to ask for a number"
  Prompt$ = "Enter the number"
  Default$ = ""
  X% = 200
  Y% = 200
  N$ = InputBox$(Prompt$, Title$, Default$, X%, Y%)
End Sub 

When this Input Box is run where is the answer?

How do I retrieve it?   Where is it stored?  In a parameter?  I am looking for an integer.

I hope that makes sense.  I don't even know enough to ask the right question.   Wink

Greg
Logged
poppabear
S S SYSTEMS, LLC
Global Moderator
*
Offline Offline

Posts: 1,707


Briceville, TN, USA


View Profile WWW
« Reply #1 on: March 29, 2009, 09:31:11 AM »

N$  is the string that the user types in.

The type that N$ is a string, if you want it to be a number you will need to use a string to int or decimal or float function from the book.

scott
Logged

Commercial Mach3: Screens (regular and flash), Wizards, Plug-ins, Brains, PLCs, Macros, ATC's, machine build, retrofit and Prototyping
http://sites.google.com/site/volunteerfablab/
Greolt
Global Moderator
*
Offline Offline

Posts: 872


View Profile
« Reply #2 on: March 30, 2009, 06:07:07 PM »

Thanks Scott

It was fairly obvious once I saw it.  Usually is isn't it.  Grin


Dim P583 As Integer

Title$ = "Box to ask for a number"
Prompt$ = "Enter the number"
Default$ = ""
X% = 200
Y% = 200
P583 = InputBox$(Prompt$, Title$, Default$, X%, Y%)

Greg
Logged
Pages: 1   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!