LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jay Jay is offline
external usenet poster
 
Posts: 671
Default How does this function works?

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
 
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
function works on some sheets but not others danafeldman Excel Worksheet Functions 4 October 13th 08 07:30 PM
Function works in one cell but not another myssieh Excel Worksheet Functions 2 September 3rd 08 08:34 PM
Shell function sometimes works, sometimes doesn't HC Hamaker[_2_] Excel Programming 5 June 11th 07 09:02 PM
Can someone test this IF function for me, I'm not sure that it works. dd Excel Worksheet Functions 3 February 22nd 07 08:55 AM
SMALL FUNCTION - How it works [email protected] Excel Discussion (Misc queries) 6 February 13th 07 09:23 AM


All times are GMT +1. The time now is 05:51 PM.

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

About Us

"It's about Microsoft Excel"