Click here to Skip to main content
16,011,685 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Visaul Basic program giving me fits! Pin
Henry Minute12-Oct-09 6:57
Henry Minute12-Oct-09 6:57 
GeneralRe: Visaul Basic program giving me fits! Pin
Mycroft Holmes12-Oct-09 17:57
professionalMycroft Holmes12-Oct-09 17:57 
GeneralRe: Visaul Basic program giving me fits! Pin
Henry Minute13-Oct-09 0:28
Henry Minute13-Oct-09 0:28 
QuestionHow To Create a basic Gantt chart Pin
Anoop Brijmohun12-Oct-09 3:24
Anoop Brijmohun12-Oct-09 3:24 
AnswerRe: How To Create a basic Gantt chart Pin
Henry Minute12-Oct-09 4:18
Henry Minute12-Oct-09 4:18 
GeneralRe: How To Create a basic Gantt chart Pin
Anoop Brijmohun12-Oct-09 4:24
Anoop Brijmohun12-Oct-09 4:24 
AnswerRe: How To Create a basic Gantt chart Pin
Andy_L_J12-Oct-09 18:37
Andy_L_J12-Oct-09 18:37 
QuestionPassing ByVal or ByRef Pin
PAguilar0912-Oct-09 1:54
PAguilar0912-Oct-09 1:54 
I made a console program that is used by a local carpet company. I am still new to VB.NET and dont know what is the correct syntax for passing variables between subroutines? I am using global variables right now and i know that it is not the best way to do things. So I have provided one of my subroutines below? How would I create variables byVal as an argument

Module CarpetCoInc

Dim dFeet, dWidth As Double 'store width and feet
Dim dCarPrice, dPadPrice, dLaborCost As Double 'store carpet price, pad price, and labor cost
Dim dCarpetCost As Double 'for cost display
Dim dPadCost As Double 'cost display
Dim dLabor As Double 'cost display
Dim dSubTotal As Double 'subtotal display
Dim dSTax As Double 'sales tax display
Dim dSqYrds As Double 'sq yards
Dim dGrandTotal As Double 'store grand total amount

'variables needed to create and output file
Dim fileName As String
Dim fileWriter As StreamWriter
Dim output As FileStream

Sub Main()
'this is the main subroutine for the entire program

Call InputVals() 'call subroutine
Call Display() 'call subroutine

Call BidFile() 'call subroutine

Console.Read() 'pause screen
End Sub


Public Sub InputVals()
'this subroutine will be used to display and obtain data from user


'display data
Console.WriteLine("Please enter Length of room in Feet: ")
dFeet = Console.ReadLine 'get data and assign it to variable
'dF = Console.ReadLine

Console.WriteLine()
Console.WriteLine("Please enter Width of room in Feet: ")
dWidth = Console.ReadLine 'get data and assign it to variable

Console.WriteLine()
Console.WriteLine("Please enter Price per Yard of carpet: ")
dCarPrice = Console.ReadLine 'get data and assign it to variable

Console.WriteLine()
Console.WriteLine("Please enter Price per yard of pad: ")
dPadPrice = Console.ReadLine 'get data and assign it to variable

Console.WriteLine()
Console.WriteLine("Please enter Price per yard of Labor: ")
dLaborCost = Console.ReadLine 'get data and assign it to variable

Console.WriteLine()

End Sub
AnswerRe: Passing ByVal or ByRef Pin
freakyit12-Oct-09 3:02
freakyit12-Oct-09 3:02 
GeneralRe: Passing ByVal or ByRef Pin
PAguilar0912-Oct-09 3:48
PAguilar0912-Oct-09 3:48 
GeneralRe: Passing ByVal or ByRef Pin
Luc Pattyn12-Oct-09 3:53
sitebuilderLuc Pattyn12-Oct-09 3:53 
AnswerRe: Passing ByVal or ByRef Pin
Andy_L_J12-Oct-09 19:02
Andy_L_J12-Oct-09 19:02 
QuestionHelp for Filtering Database by Date !! Pin
jeshra27911-Oct-09 5:14
jeshra27911-Oct-09 5:14 
AnswerRe: Help for Filtering Database by Date !! Pin
dan!sh 11-Oct-09 6:04
professional dan!sh 11-Oct-09 6:04 
GeneralRe: Help for Filtering Database by Date !! Pin
jeshra27911-Oct-09 7:01
jeshra27911-Oct-09 7:01 
GeneralRe: Help for Filtering Database by Date !! Pin
Richard MacCutchan11-Oct-09 8:11
mveRichard MacCutchan11-Oct-09 8:11 
GeneralRe: Help for Filtering Database by Date !! Pin
jeshra27911-Oct-09 18:10
jeshra27911-Oct-09 18:10 
GeneralRe: Help for Filtering Database by Date !! Pin
dan!sh 11-Oct-09 18:37
professional dan!sh 11-Oct-09 18:37 
AnswerRe: Help for Filtering Database by Date !! Pin
Luc Pattyn12-Oct-09 0:31
sitebuilderLuc Pattyn12-Oct-09 0:31 
Questionwriting a timestamp to a xml file. Pin
malcomhfc11-Oct-09 4:15
malcomhfc11-Oct-09 4:15 
AnswerRe: writing a timestamp to a xml file. Pin
dan!sh 11-Oct-09 6:07
professional dan!sh 11-Oct-09 6:07 
GeneralRe: writing a timestamp to a xml file. Pin
malcomhfc11-Oct-09 7:58
malcomhfc11-Oct-09 7:58 
GeneralRe: writing a timestamp to a xml file. Pin
dan!sh 11-Oct-09 15:32
professional dan!sh 11-Oct-09 15:32 
GeneralRe: writing a timestamp to a xml file. Pin
freakyit11-Oct-09 23:57
freakyit11-Oct-09 23:57 
GeneralRe: writing a timestamp to a xml file. Pin
malcomhfc12-Oct-09 10:44
malcomhfc12-Oct-09 10:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.