Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,412 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,448 people online right now. Registration is fast and FREE... Join Now!




Sub Procedures

 
Reply to this topicStart new topic

Sub Procedures, Trying to get the concept

Rojos
14 Oct, 2008 - 02:39 PM
Post #1

New D.I.C Head
*

Joined: 14 Oct, 2008
Posts: 1

An application contains the following procedure:

vb

Sub Display (ByVal intArgl As Integer,ByVal strArg2 As String,_
ByVal sngArg3 As Single)
MessageBox.Show (“Here are the values: “ & _
intArgl.ToString() & “ “ & _
strArg2 & “ “ sngArg3.ToString())
End Sub


Trying to Write a statement that calls the procedure and passes it the following variables:I did the first one but not sure if I am understanding if this is what it's asking me to do.

vb

Dim strName As String
Sub GetName (ByRef strName as string)
‘Get the user’s name
strName = InputBox (“Enter your name.”)
End Sub

Dim intAge As Integer

Dim sngIncome As Single

User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Sub Procedures
14 Oct, 2008 - 02:45 PM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 8,993



Thanked: 125 times
Dream Kudos: 8625
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
I'm not understanding your question?
User is online!Profile CardPM
+Quote Post

thava
RE: Sub Procedures
14 Oct, 2008 - 06:46 PM
Post #3

D.I.C Regular
Group Icon

Joined: 17 Apr, 2007
Posts: 442



Thanked: 18 times
Dream Kudos: 50
My Contributions
i think the problem is how to call your procedure,
ok
just call the procedure with that name
vb
 
Dim strName As String
Sub GetName (ByRef strName as string)
‘Get the user’s name
strName = InputBox (“Enter your name.”)
End Sub
Dim intAge As Integer
Dim sngIncome As Single
Display intAge,strName,sngIncome


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 12:32PM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month