Thank you for the reply,
I updated the sheet/ code with global variables, even then , i could not able to get the desired output.
Here i put this way, Say I have a Product ABC with many variants, in which, i have placed 2 variants , Var1 and Var2. If Variant 1 is needed , then user need to click Question1 YES, so that variant 1 can be selected. Similar with Question2 (Variant 2)
I want to keep a single userform to all the options, so i am changing label by keeping the content in some cell , and copying it from there -- which is also sometimes not working
If User need variant 1 to be included in the product ABC, he clicks Option button1, then Userform appear with this code.
Global Variable:
Dim VarT As Integer, Var1 As Integer, Var2 As Integer
Userform Initialization Code
Private Sub UserForm_Initialize()
Label1.Caption = ThisWorkbook.Sheets("Sheet2").Range("S10").Value 'At times this operation is not getting executed, all the time it is showing the option 1 label
End Sub
which is somtimes not working
!! it is showing the same option1 label!! 
Userform OK button code:
Private Sub CommandButton1_Click()
If ComboBox1.Value <> BLANK Then
VarT = ComboBox1.Value
Me.Hide
End If
Exit Sub
End Sub
Variant 1 code : which has to save the VarT content into some other variable as VarT is dynamically changing variable.
Public Sub OptionButton1_Click() 'This is a option in the costing whether to include the price of this the variant !
Dim Var1 As Integer
ThisWorkbook.Sheets("Sheet2").Range("S10").Value = "Do you want to include Option 1 value in the price:"
UserForm1.Show
Var1 = VarT
End Sub
The main code which has to sum up the variants with the base main cost of the product ABC,
Sub Main()
Dim FinalVal As Integer
'MsgBox VarT
FinalValue = 3 + Var1 + Var2 ' It has to display the cost of the product with variants that calculated
MsgBox "The final value is : " & FinalVal ' Instead it is desplaying 0 :(
End Sub
The problems that i am facing are :
1. The label is sometimes not changing to option 2 content , it is still says Option 1
2. The answer is not desired , answer is coming to 0 , which should be minimum 3 if no variants there !!
Please help me!!
Thanks !
WR
Sri
Bookmarks