Hello all,
I have a sub that is calling a funciton. The function needs to set a flag and send this flag value back to the sub. The sub will then perform based on the flag value. I can't seem to get the flag to be sent back to the sub. Can someone please help me figure out what I'm doing wrong or if this can even be done.
Thanking you in advance
Here's is part of my code:
Sub RefreshSheet()
Dim blnFlag As Boolean
blnFlag = True
Product (blnFlag)
If Not blnFlag Then
MsgBox "No Products"
Exit Sub
End If
(Code if sub continues)
End Sub
Function Product(blnFlag As Boolean)
( code to set iCopyEndRow and iStartRow values)
If iCopyEndRow < iStartRow Then
blnFlag = False
Exit Function
End If
(code if function continues)
End Function
I have a sub that is calling a funciton. The function needs to set a flag and send this flag value back to the sub. The sub will then perform based on the flag value. I can't seem to get the flag to be sent back to the sub. Can someone please help me figure out what I'm doing wrong or if this can even be done.
Thanking you in advance
Here's is part of my code:
Sub RefreshSheet()
Dim blnFlag As Boolean
blnFlag = True
Product (blnFlag)
If Not blnFlag Then
MsgBox "No Products"
Exit Sub
End If
(Code if sub continues)
End Sub
Function Product(blnFlag As Boolean)
( code to set iCopyEndRow and iStartRow values)
If iCopyEndRow < iStartRow Then
blnFlag = False
Exit Function
End If
(code if function continues)
End Function