Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set Function to False -Why??
I inherited some VBA code sometime ago, but do not understand one part
of it The function is declared, some variables are declared and then the fucntion is set to false What does this do and why would it be done? Thanks JDB ------------------------ Public Function XA_List_Variables_Results_Sheet() As Integer Dim LoinGrade As String, LoinMinMax As String Dim PackStyle As String Dim C As Integer, R As Integer Dim I As Integer, LstIndex As Integer ' List_Variables_Results_Sheet = False Worksheets("Matrix-Sheet").Activate Rangename = "Supply" GoSub LoadSupplyVariables 'more code End Function |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set Function to False -Why??
Sorry should be
XA_ List_Variables_Results_Sheet = False |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Set Function to False -Why??
The value assigned to the function is the value returned by that function.
So this line effectively sets the default return value to false (0); presumably under certain conditions the function would change it to true (-1). --Bruce "JDB" wrote: I inherited some VBA code sometime ago, but do not understand one part of it The function is declared, some variables are declared and then the fucntion is set to false What does this do and why would it be done? Thanks JDB ------------------------ Public Function XA_List_Variables_Results_Sheet() As Integer Dim LoinGrade As String, LoinMinMax As String Dim PackStyle As String Dim C As Integer, R As Integer Dim I As Integer, LstIndex As Integer ' List_Variables_Results_Sheet = False Worksheets("Matrix-Sheet").Activate Rangename = "Supply" GoSub LoadSupplyVariables 'more code End Function |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF with function as false return | Excel Worksheet Functions | |||
TRUE/FALSE function in IF statement | Excel Worksheet Functions | |||
My IF function is saying something is false when it is true... | Excel Worksheet Functions | |||
IF function - If false argument query | Excel Worksheet Functions | |||
IF Function returns False instead of 0 | Excel Worksheet Functions |