Trouble calling back variables












-4















I am having troubles with an exercise in my Visual Basic class.



I need to use a sub procedure can recognize whether or not certain radio buttons are selected and have them add to the cost of the product for sale.

I then need to reference them in the btnClick procedure so I can use that to display the cost to the string.



Instructions for reference:



Mats-R-Us sells three different types of mats:<br> 
- Standard ($99),<br>
- Deluxe ($129),<br>
- INTERMEDIATE Premium ($179).<br>

All of the mats are available in:<br>
- blue,<br>
- red ($10 extra), <br>
- pink ($15 extra). <br>


There is also an extra $25 charge if the customer wants the mat to be foldable.




Create a Windows Forms application. Use the following names for the
project and solution, respectively: Mats Project and Mats Solution.
Save the application in the VB2017Chap06 folder. Create the interface
shown in Figure 6-58. Use a function to determine the price of the mat
before any additional charges. Use a Sub procedure to calculate the
total additional charge (if any).




The code I currently have:
Option Explicit On, Option Strict On, Option Infer Off



enter image description here



Public Class frmMain
Private Function GetStandard(dblTotal As Double) As Double
Dim dblPrice As Double

If radStandard.Checked Then
dblPrice = 99
ElseIf radDeluxe.Checked Then
dblPrice = 129
ElseIf radPremium.Checked Then
dblPrice = 179
End If
Return dblPrice
dblPrice = dblTotal
End Function

Private Sub AddColorCost(ByRef dblTotal As Double)
Dim dblPrice As Double
If radRed.Checked Then
dblPrice = dblPrice + 10
ElseIf radPink.Checked Then
dblPrice = dblPrice + 15
End If

End Sub

Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click
Dim DblTotal As Double
Call AddColorCost(dblTotal)
lblPrice.Text = dblTotal.ToString("C2")
End Sub

Private Sub BtnExit_Click(sender As Object, e As EventArgs) Handles BtnExit.Click
Me.Close()
End Sub
End Class


Edit: I have attempted to include the price increases in the subfunction but $0 is the only number that displays when I debug everything.










share|improve this question

























  • Are they all just a bunch of checkboxes for colors/foldable? Seems strange for an interface choice considering there should only be 1 checked of the "standard" pricing and color (assuming you're only calculating a single price).

    – Nathan Champion
    Nov 22 '18 at 0:08











  • Add more details to your code. Your question is not clear enough

    – preciousbetine
    Nov 22 '18 at 0:21











  • @NathanChampion I was given an image to model the interface off of and it does have more than 1 radio button for standard pricing. The interface has 6 buttons including the 2 for the standard cost. It has 1 checkbox to indicate the foldable option.

    – Stormside76
    Nov 22 '18 at 0:49











  • @preciousbetine I honestly just need some help with everything. I am able to display the cost for the different mat types but I don't know how to code in the different color costs as well as the foldable option. The issue with adding more details is that I don't know what to add.

    – Stormside76
    Nov 22 '18 at 0:52











  • Diane Zak exercise... you also should be confirming if the user wants to exit the application...

    – Çöđěxěŕ
    Nov 22 '18 at 0:53


















-4















I am having troubles with an exercise in my Visual Basic class.



I need to use a sub procedure can recognize whether or not certain radio buttons are selected and have them add to the cost of the product for sale.

I then need to reference them in the btnClick procedure so I can use that to display the cost to the string.



Instructions for reference:



Mats-R-Us sells three different types of mats:<br> 
- Standard ($99),<br>
- Deluxe ($129),<br>
- INTERMEDIATE Premium ($179).<br>

All of the mats are available in:<br>
- blue,<br>
- red ($10 extra), <br>
- pink ($15 extra). <br>


There is also an extra $25 charge if the customer wants the mat to be foldable.




Create a Windows Forms application. Use the following names for the
project and solution, respectively: Mats Project and Mats Solution.
Save the application in the VB2017Chap06 folder. Create the interface
shown in Figure 6-58. Use a function to determine the price of the mat
before any additional charges. Use a Sub procedure to calculate the
total additional charge (if any).




The code I currently have:
Option Explicit On, Option Strict On, Option Infer Off



enter image description here



Public Class frmMain
Private Function GetStandard(dblTotal As Double) As Double
Dim dblPrice As Double

If radStandard.Checked Then
dblPrice = 99
ElseIf radDeluxe.Checked Then
dblPrice = 129
ElseIf radPremium.Checked Then
dblPrice = 179
End If
Return dblPrice
dblPrice = dblTotal
End Function

Private Sub AddColorCost(ByRef dblTotal As Double)
Dim dblPrice As Double
If radRed.Checked Then
dblPrice = dblPrice + 10
ElseIf radPink.Checked Then
dblPrice = dblPrice + 15
End If

End Sub

Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click
Dim DblTotal As Double
Call AddColorCost(dblTotal)
lblPrice.Text = dblTotal.ToString("C2")
End Sub

Private Sub BtnExit_Click(sender As Object, e As EventArgs) Handles BtnExit.Click
Me.Close()
End Sub
End Class


Edit: I have attempted to include the price increases in the subfunction but $0 is the only number that displays when I debug everything.










share|improve this question

























  • Are they all just a bunch of checkboxes for colors/foldable? Seems strange for an interface choice considering there should only be 1 checked of the "standard" pricing and color (assuming you're only calculating a single price).

    – Nathan Champion
    Nov 22 '18 at 0:08











  • Add more details to your code. Your question is not clear enough

    – preciousbetine
    Nov 22 '18 at 0:21











  • @NathanChampion I was given an image to model the interface off of and it does have more than 1 radio button for standard pricing. The interface has 6 buttons including the 2 for the standard cost. It has 1 checkbox to indicate the foldable option.

    – Stormside76
    Nov 22 '18 at 0:49











  • @preciousbetine I honestly just need some help with everything. I am able to display the cost for the different mat types but I don't know how to code in the different color costs as well as the foldable option. The issue with adding more details is that I don't know what to add.

    – Stormside76
    Nov 22 '18 at 0:52











  • Diane Zak exercise... you also should be confirming if the user wants to exit the application...

    – Çöđěxěŕ
    Nov 22 '18 at 0:53
















-4












-4








-4








I am having troubles with an exercise in my Visual Basic class.



I need to use a sub procedure can recognize whether or not certain radio buttons are selected and have them add to the cost of the product for sale.

I then need to reference them in the btnClick procedure so I can use that to display the cost to the string.



Instructions for reference:



Mats-R-Us sells three different types of mats:<br> 
- Standard ($99),<br>
- Deluxe ($129),<br>
- INTERMEDIATE Premium ($179).<br>

All of the mats are available in:<br>
- blue,<br>
- red ($10 extra), <br>
- pink ($15 extra). <br>


There is also an extra $25 charge if the customer wants the mat to be foldable.




Create a Windows Forms application. Use the following names for the
project and solution, respectively: Mats Project and Mats Solution.
Save the application in the VB2017Chap06 folder. Create the interface
shown in Figure 6-58. Use a function to determine the price of the mat
before any additional charges. Use a Sub procedure to calculate the
total additional charge (if any).




The code I currently have:
Option Explicit On, Option Strict On, Option Infer Off



enter image description here



Public Class frmMain
Private Function GetStandard(dblTotal As Double) As Double
Dim dblPrice As Double

If radStandard.Checked Then
dblPrice = 99
ElseIf radDeluxe.Checked Then
dblPrice = 129
ElseIf radPremium.Checked Then
dblPrice = 179
End If
Return dblPrice
dblPrice = dblTotal
End Function

Private Sub AddColorCost(ByRef dblTotal As Double)
Dim dblPrice As Double
If radRed.Checked Then
dblPrice = dblPrice + 10
ElseIf radPink.Checked Then
dblPrice = dblPrice + 15
End If

End Sub

Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click
Dim DblTotal As Double
Call AddColorCost(dblTotal)
lblPrice.Text = dblTotal.ToString("C2")
End Sub

Private Sub BtnExit_Click(sender As Object, e As EventArgs) Handles BtnExit.Click
Me.Close()
End Sub
End Class


Edit: I have attempted to include the price increases in the subfunction but $0 is the only number that displays when I debug everything.










share|improve this question
















I am having troubles with an exercise in my Visual Basic class.



I need to use a sub procedure can recognize whether or not certain radio buttons are selected and have them add to the cost of the product for sale.

I then need to reference them in the btnClick procedure so I can use that to display the cost to the string.



Instructions for reference:



Mats-R-Us sells three different types of mats:<br> 
- Standard ($99),<br>
- Deluxe ($129),<br>
- INTERMEDIATE Premium ($179).<br>

All of the mats are available in:<br>
- blue,<br>
- red ($10 extra), <br>
- pink ($15 extra). <br>


There is also an extra $25 charge if the customer wants the mat to be foldable.




Create a Windows Forms application. Use the following names for the
project and solution, respectively: Mats Project and Mats Solution.
Save the application in the VB2017Chap06 folder. Create the interface
shown in Figure 6-58. Use a function to determine the price of the mat
before any additional charges. Use a Sub procedure to calculate the
total additional charge (if any).




The code I currently have:
Option Explicit On, Option Strict On, Option Infer Off



enter image description here



Public Class frmMain
Private Function GetStandard(dblTotal As Double) As Double
Dim dblPrice As Double

If radStandard.Checked Then
dblPrice = 99
ElseIf radDeluxe.Checked Then
dblPrice = 129
ElseIf radPremium.Checked Then
dblPrice = 179
End If
Return dblPrice
dblPrice = dblTotal
End Function

Private Sub AddColorCost(ByRef dblTotal As Double)
Dim dblPrice As Double
If radRed.Checked Then
dblPrice = dblPrice + 10
ElseIf radPink.Checked Then
dblPrice = dblPrice + 15
End If

End Sub

Private Sub btnCalc_Click(sender As Object, e As EventArgs) Handles btnCalc.Click
Dim DblTotal As Double
Call AddColorCost(dblTotal)
lblPrice.Text = dblTotal.ToString("C2")
End Sub

Private Sub BtnExit_Click(sender As Object, e As EventArgs) Handles BtnExit.Click
Me.Close()
End Sub
End Class


Edit: I have attempted to include the price increases in the subfunction but $0 is the only number that displays when I debug everything.







vb.net visual-studio callback






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 15:40









Daredevil

35011




35011










asked Nov 21 '18 at 23:08









Stormside76Stormside76

13




13













  • Are they all just a bunch of checkboxes for colors/foldable? Seems strange for an interface choice considering there should only be 1 checked of the "standard" pricing and color (assuming you're only calculating a single price).

    – Nathan Champion
    Nov 22 '18 at 0:08











  • Add more details to your code. Your question is not clear enough

    – preciousbetine
    Nov 22 '18 at 0:21











  • @NathanChampion I was given an image to model the interface off of and it does have more than 1 radio button for standard pricing. The interface has 6 buttons including the 2 for the standard cost. It has 1 checkbox to indicate the foldable option.

    – Stormside76
    Nov 22 '18 at 0:49











  • @preciousbetine I honestly just need some help with everything. I am able to display the cost for the different mat types but I don't know how to code in the different color costs as well as the foldable option. The issue with adding more details is that I don't know what to add.

    – Stormside76
    Nov 22 '18 at 0:52











  • Diane Zak exercise... you also should be confirming if the user wants to exit the application...

    – Çöđěxěŕ
    Nov 22 '18 at 0:53





















  • Are they all just a bunch of checkboxes for colors/foldable? Seems strange for an interface choice considering there should only be 1 checked of the "standard" pricing and color (assuming you're only calculating a single price).

    – Nathan Champion
    Nov 22 '18 at 0:08











  • Add more details to your code. Your question is not clear enough

    – preciousbetine
    Nov 22 '18 at 0:21











  • @NathanChampion I was given an image to model the interface off of and it does have more than 1 radio button for standard pricing. The interface has 6 buttons including the 2 for the standard cost. It has 1 checkbox to indicate the foldable option.

    – Stormside76
    Nov 22 '18 at 0:49











  • @preciousbetine I honestly just need some help with everything. I am able to display the cost for the different mat types but I don't know how to code in the different color costs as well as the foldable option. The issue with adding more details is that I don't know what to add.

    – Stormside76
    Nov 22 '18 at 0:52











  • Diane Zak exercise... you also should be confirming if the user wants to exit the application...

    – Çöđěxěŕ
    Nov 22 '18 at 0:53



















Are they all just a bunch of checkboxes for colors/foldable? Seems strange for an interface choice considering there should only be 1 checked of the "standard" pricing and color (assuming you're only calculating a single price).

– Nathan Champion
Nov 22 '18 at 0:08





Are they all just a bunch of checkboxes for colors/foldable? Seems strange for an interface choice considering there should only be 1 checked of the "standard" pricing and color (assuming you're only calculating a single price).

– Nathan Champion
Nov 22 '18 at 0:08













Add more details to your code. Your question is not clear enough

– preciousbetine
Nov 22 '18 at 0:21





Add more details to your code. Your question is not clear enough

– preciousbetine
Nov 22 '18 at 0:21













@NathanChampion I was given an image to model the interface off of and it does have more than 1 radio button for standard pricing. The interface has 6 buttons including the 2 for the standard cost. It has 1 checkbox to indicate the foldable option.

– Stormside76
Nov 22 '18 at 0:49





@NathanChampion I was given an image to model the interface off of and it does have more than 1 radio button for standard pricing. The interface has 6 buttons including the 2 for the standard cost. It has 1 checkbox to indicate the foldable option.

– Stormside76
Nov 22 '18 at 0:49













@preciousbetine I honestly just need some help with everything. I am able to display the cost for the different mat types but I don't know how to code in the different color costs as well as the foldable option. The issue with adding more details is that I don't know what to add.

– Stormside76
Nov 22 '18 at 0:52





@preciousbetine I honestly just need some help with everything. I am able to display the cost for the different mat types but I don't know how to code in the different color costs as well as the foldable option. The issue with adding more details is that I don't know what to add.

– Stormside76
Nov 22 '18 at 0:52













Diane Zak exercise... you also should be confirming if the user wants to exit the application...

– Çöđěxěŕ
Nov 22 '18 at 0:53







Diane Zak exercise... you also should be confirming if the user wants to exit the application...

– Çöđěxěŕ
Nov 22 '18 at 0:53














1 Answer
1






active

oldest

votes


















1














Let's follow the instructions.
Use a function to determine the price of the mat before any additional charges.



Private Function BaseCost() As Decimal
Dim dblPrice As Decimal

If radStandard.Checked Then
dblPrice = 99
ElseIf radDeluxe.Checked Then
dblPrice = 129
ElseIf radPremium.Checked Then
dblPrice = 179
End If
Return dblPrice
End Function


Use a Sub procedure to calculate the total additional charge (if any).
Since we are using a Sub and not returning a value we will use a Form level (class level) variable so other methods can see it. Another approach would be to pass a parameter ByRef but don't worry about that now.
AddChanges += 10 is a shortcut way to write AddChanges = AddChanges + 10



'This variable is Form level (class level) it is not inside a method but it is inside the class.
Private AddCharges As Decimal

Private Sub AdditionalCharges()
If radRed.Checked Then
AddCharges += 10
ElseIf radPink.Checked Then
AddCharges += 15
End If
If chkFoldable.Checked Then
AddCharges += 25
End If
End Sub


Now add it all up in the calculate button



Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
Dim Total As Decimal
'BaseCost is a Function and returns a value
Total = BaseCost()
'AdditionalCharges is a Sub and will change the Form level variable
AdditionalCharges()
Total += AddCharges
lblPrice.Text = Total.ToString("C2")
'reset AddCharges so you can make different selections and Calculate again.
AddCharges = 0
End Sub





share|improve this answer
























  • what is the difference between your code and mine

    – preciousbetine
    Nov 22 '18 at 13:41






  • 1





    @preciousbetine Just more explanation and following the directions to have a Sub procedure showing the difference between a Sub and a Function.

    – Mary
    Nov 22 '18 at 16:39











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53421714%2ftrouble-calling-back-variables%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Let's follow the instructions.
Use a function to determine the price of the mat before any additional charges.



Private Function BaseCost() As Decimal
Dim dblPrice As Decimal

If radStandard.Checked Then
dblPrice = 99
ElseIf radDeluxe.Checked Then
dblPrice = 129
ElseIf radPremium.Checked Then
dblPrice = 179
End If
Return dblPrice
End Function


Use a Sub procedure to calculate the total additional charge (if any).
Since we are using a Sub and not returning a value we will use a Form level (class level) variable so other methods can see it. Another approach would be to pass a parameter ByRef but don't worry about that now.
AddChanges += 10 is a shortcut way to write AddChanges = AddChanges + 10



'This variable is Form level (class level) it is not inside a method but it is inside the class.
Private AddCharges As Decimal

Private Sub AdditionalCharges()
If radRed.Checked Then
AddCharges += 10
ElseIf radPink.Checked Then
AddCharges += 15
End If
If chkFoldable.Checked Then
AddCharges += 25
End If
End Sub


Now add it all up in the calculate button



Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
Dim Total As Decimal
'BaseCost is a Function and returns a value
Total = BaseCost()
'AdditionalCharges is a Sub and will change the Form level variable
AdditionalCharges()
Total += AddCharges
lblPrice.Text = Total.ToString("C2")
'reset AddCharges so you can make different selections and Calculate again.
AddCharges = 0
End Sub





share|improve this answer
























  • what is the difference between your code and mine

    – preciousbetine
    Nov 22 '18 at 13:41






  • 1





    @preciousbetine Just more explanation and following the directions to have a Sub procedure showing the difference between a Sub and a Function.

    – Mary
    Nov 22 '18 at 16:39
















1














Let's follow the instructions.
Use a function to determine the price of the mat before any additional charges.



Private Function BaseCost() As Decimal
Dim dblPrice As Decimal

If radStandard.Checked Then
dblPrice = 99
ElseIf radDeluxe.Checked Then
dblPrice = 129
ElseIf radPremium.Checked Then
dblPrice = 179
End If
Return dblPrice
End Function


Use a Sub procedure to calculate the total additional charge (if any).
Since we are using a Sub and not returning a value we will use a Form level (class level) variable so other methods can see it. Another approach would be to pass a parameter ByRef but don't worry about that now.
AddChanges += 10 is a shortcut way to write AddChanges = AddChanges + 10



'This variable is Form level (class level) it is not inside a method but it is inside the class.
Private AddCharges As Decimal

Private Sub AdditionalCharges()
If radRed.Checked Then
AddCharges += 10
ElseIf radPink.Checked Then
AddCharges += 15
End If
If chkFoldable.Checked Then
AddCharges += 25
End If
End Sub


Now add it all up in the calculate button



Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
Dim Total As Decimal
'BaseCost is a Function and returns a value
Total = BaseCost()
'AdditionalCharges is a Sub and will change the Form level variable
AdditionalCharges()
Total += AddCharges
lblPrice.Text = Total.ToString("C2")
'reset AddCharges so you can make different selections and Calculate again.
AddCharges = 0
End Sub





share|improve this answer
























  • what is the difference between your code and mine

    – preciousbetine
    Nov 22 '18 at 13:41






  • 1





    @preciousbetine Just more explanation and following the directions to have a Sub procedure showing the difference between a Sub and a Function.

    – Mary
    Nov 22 '18 at 16:39














1












1








1







Let's follow the instructions.
Use a function to determine the price of the mat before any additional charges.



Private Function BaseCost() As Decimal
Dim dblPrice As Decimal

If radStandard.Checked Then
dblPrice = 99
ElseIf radDeluxe.Checked Then
dblPrice = 129
ElseIf radPremium.Checked Then
dblPrice = 179
End If
Return dblPrice
End Function


Use a Sub procedure to calculate the total additional charge (if any).
Since we are using a Sub and not returning a value we will use a Form level (class level) variable so other methods can see it. Another approach would be to pass a parameter ByRef but don't worry about that now.
AddChanges += 10 is a shortcut way to write AddChanges = AddChanges + 10



'This variable is Form level (class level) it is not inside a method but it is inside the class.
Private AddCharges As Decimal

Private Sub AdditionalCharges()
If radRed.Checked Then
AddCharges += 10
ElseIf radPink.Checked Then
AddCharges += 15
End If
If chkFoldable.Checked Then
AddCharges += 25
End If
End Sub


Now add it all up in the calculate button



Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
Dim Total As Decimal
'BaseCost is a Function and returns a value
Total = BaseCost()
'AdditionalCharges is a Sub and will change the Form level variable
AdditionalCharges()
Total += AddCharges
lblPrice.Text = Total.ToString("C2")
'reset AddCharges so you can make different selections and Calculate again.
AddCharges = 0
End Sub





share|improve this answer













Let's follow the instructions.
Use a function to determine the price of the mat before any additional charges.



Private Function BaseCost() As Decimal
Dim dblPrice As Decimal

If radStandard.Checked Then
dblPrice = 99
ElseIf radDeluxe.Checked Then
dblPrice = 129
ElseIf radPremium.Checked Then
dblPrice = 179
End If
Return dblPrice
End Function


Use a Sub procedure to calculate the total additional charge (if any).
Since we are using a Sub and not returning a value we will use a Form level (class level) variable so other methods can see it. Another approach would be to pass a parameter ByRef but don't worry about that now.
AddChanges += 10 is a shortcut way to write AddChanges = AddChanges + 10



'This variable is Form level (class level) it is not inside a method but it is inside the class.
Private AddCharges As Decimal

Private Sub AdditionalCharges()
If radRed.Checked Then
AddCharges += 10
ElseIf radPink.Checked Then
AddCharges += 15
End If
If chkFoldable.Checked Then
AddCharges += 25
End If
End Sub


Now add it all up in the calculate button



Private Sub btnCalculate_Click(sender As Object, e As EventArgs) Handles btnCalculate.Click
Dim Total As Decimal
'BaseCost is a Function and returns a value
Total = BaseCost()
'AdditionalCharges is a Sub and will change the Form level variable
AdditionalCharges()
Total += AddCharges
lblPrice.Text = Total.ToString("C2")
'reset AddCharges so you can make different selections and Calculate again.
AddCharges = 0
End Sub






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 22 '18 at 7:32









MaryMary

3,8092921




3,8092921













  • what is the difference between your code and mine

    – preciousbetine
    Nov 22 '18 at 13:41






  • 1





    @preciousbetine Just more explanation and following the directions to have a Sub procedure showing the difference between a Sub and a Function.

    – Mary
    Nov 22 '18 at 16:39



















  • what is the difference between your code and mine

    – preciousbetine
    Nov 22 '18 at 13:41






  • 1





    @preciousbetine Just more explanation and following the directions to have a Sub procedure showing the difference between a Sub and a Function.

    – Mary
    Nov 22 '18 at 16:39

















what is the difference between your code and mine

– preciousbetine
Nov 22 '18 at 13:41





what is the difference between your code and mine

– preciousbetine
Nov 22 '18 at 13:41




1




1





@preciousbetine Just more explanation and following the directions to have a Sub procedure showing the difference between a Sub and a Function.

– Mary
Nov 22 '18 at 16:39





@preciousbetine Just more explanation and following the directions to have a Sub procedure showing the difference between a Sub and a Function.

– Mary
Nov 22 '18 at 16:39




















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53421714%2ftrouble-calling-back-variables%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Tangent Lines Diagram Along Smooth Curve

Yusuf al-Mu'taman ibn Hud

Zucchini