J
Jay
Hi Guys!
Can anyone help me how does this one works and how to use this function?
Thanks,
Jay
Function VTest(ByRef AMsg As String, ByRef AMsW As Double, ByRef AMsX As
Integer, _
ByRef AMsY As Integer, ByRef AMsZ As Integer, ByRef AMsH As Integer,
ByRef AMsT As Variant)
'Verify ActiveCell and ActiveSheet Selection
'Used by Procedures - Months, Distribute, & Produce
Dim Tmp As Variant, Tmi As Integer
VTest = WWks()
If VTest Then Exit Function
AMsP = AMsk
If IsNumeric(Expression:=ActiveCell.Value) Then
AMsW = ActiveCell.Value
If IsNumeric(AMsW) Then
GoTo Rtest
Else
GoTo Erxis
End If
Else
GoTo Erxis
End If
Erxis:
AMsD = AMsP & AMsg & Chr(13) & Chr(10) & Chr(13) & Chr(10) & AMsc
Beep
Beep
Tmp = vbOKOnly + vbCritical
ARep = MsgBox(prompt:=AMsD, Buttons:=Tmp, Title:=" SELECTION ERROR")
Erxi2:
VTest = True
Exit Function
Rtest:
If ActiveCell.Row = 17 Then GoTo Erxi2
AMsX = ActiveCell.Column
AMsY = ActiveCell.Row
AMsH = 0
If AMsg = MSP Then
Tmp = Application.Lookup(AMsX, vrEITab)
If Tmp <> AMsX Then GoTo Erxis
If AMsX = 5 Then
VTest = False
Exit Function
End If
End If
AMsP = AMso
AMsH = Int((AMsX - AMsZ) / 4)
If AMsX < AMsZ Or AMsX > Range("MaxReqCol").Value Then GoTo Erxis
Tmp = Application.Lookup(AMsY, AMsT)
' If Tmp <> AMsY Then GoTo Erxis
VTest = False
End Function 'Vtest
Can anyone help me how does this one works and how to use this function?
Thanks,
Jay
Function VTest(ByRef AMsg As String, ByRef AMsW As Double, ByRef AMsX As
Integer, _
ByRef AMsY As Integer, ByRef AMsZ As Integer, ByRef AMsH As Integer,
ByRef AMsT As Variant)
'Verify ActiveCell and ActiveSheet Selection
'Used by Procedures - Months, Distribute, & Produce
Dim Tmp As Variant, Tmi As Integer
VTest = WWks()
If VTest Then Exit Function
AMsP = AMsk
If IsNumeric(Expression:=ActiveCell.Value) Then
AMsW = ActiveCell.Value
If IsNumeric(AMsW) Then
GoTo Rtest
Else
GoTo Erxis
End If
Else
GoTo Erxis
End If
Erxis:
AMsD = AMsP & AMsg & Chr(13) & Chr(10) & Chr(13) & Chr(10) & AMsc
Beep
Beep
Tmp = vbOKOnly + vbCritical
ARep = MsgBox(prompt:=AMsD, Buttons:=Tmp, Title:=" SELECTION ERROR")
Erxi2:
VTest = True
Exit Function
Rtest:
If ActiveCell.Row = 17 Then GoTo Erxi2
AMsX = ActiveCell.Column
AMsY = ActiveCell.Row
AMsH = 0
If AMsg = MSP Then
Tmp = Application.Lookup(AMsX, vrEITab)
If Tmp <> AMsX Then GoTo Erxis
If AMsX = 5 Then
VTest = False
Exit Function
End If
End If
AMsP = AMso
AMsH = Int((AMsX - AMsZ) / 4)
If AMsX < AMsZ Or AMsX > Range("MaxReqCol").Value Then GoTo Erxis
Tmp = Application.Lookup(AMsY, AMsT)
' If Tmp <> AMsY Then GoTo Erxis
VTest = False
End Function 'Vtest