Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Set Function to False -Why??

Sorry should be
XA_ List_Variables_Results_Sheet = False

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 180
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF with function as false return Lyn Sweetapple Excel Worksheet Functions 4 March 26th 10 04:25 PM
TRUE/FALSE function in IF statement Caelan Aegana Excel Worksheet Functions 2 July 21st 08 11:45 PM
My IF function is saying something is false when it is true... dilbert16588 Excel Worksheet Functions 2 April 11th 08 07:00 AM
IF function - If false argument query Twishlist Excel Worksheet Functions 5 March 30th 08 09:40 AM
IF Function returns False instead of 0 BEEJAY Excel Worksheet Functions 2 June 23rd 05 04:23 PM


All times are GMT +1. The time now is 12:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"