Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Changing the values of variables
Okay I'm trying to build a program that a user selects from a bunch o
choices on user forms and the last user form displays the part numbe of the selections and the total price. Right now I have all my variables that contain the prices for each ite on the module1 code page, all declared as public so the all of the use forms can use them. This works fine and does what it's suppose t however I want another screen from which the orginal prices from eac part can be changed if needed. I set up another user form that assigned the contents of the textboxe that the user enters input into to the variables, but it doesn't updat them. I'm wonder if I need to use ByRef, but I'm not exactly sure ho to do this. Below I've posted some sample code from my module1 page userform1 page, and my pricing userform. Thanks for any help. Mickie Module1 page code Public curList As Currency Public strPart As String Public curListHV_10 As Currency Public curListHV_20 As Currency Public Sub List() curListHV_10 = 100 curListHV_20 = 200 End Sub UserForm1 page code Private Sub HV_10_Click() If HV_10 Then Call List curList = curList + curListHV_10 strPart = "HV-10-" End If End Sub Private Sub HV_20_Click() If HV_20 Then Call List curList = curList + curListHV_20 strPart = "HV-20-" End If End Sub Private Sub OK_Click() Me.Hide Motor.Show End Sub Pricing User Form Code Public Sub Submit_Click() curListHV_10 = Val(Me.HV_10TextBox1.Text) curListHV_20 = Val(Me.HV_20TextBox.Text) Me.Hide updated.Show End Su -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
finding the results of changing 4 variables | Excel Discussion (Misc queries) | |||
Copying functions without changing most variables in it | Excel Discussion (Misc queries) | |||
can variables pass values | Excel Programming | |||
Changing Page Headers with Variables | Excel Programming | |||
Changing objects on other Worksheets with Variables | Excel Programming |