Search Tools Links Login

Another date drop down creator


This has probably been done a million times but this is another variant of how to create dropdowns for the month, day and year. It bases the days on the month and year, so the user won't select day 31 for february. I'm happy to say I wrote this in Developers Pad.

Original Author: Devin Garlit

Code

Public Function MsgBox(Prompt As String, Optional Buttons As VbMsgBoxStyle = vbOKOnly, Optional Title As String, Optional HelpFile As String, Optional Context As Single, Optional LogToFile As Boolean = False) As VbMsgBoxResult
Dim strErrorLog As String
Dim iFileHandle As Integer
Dim strErrorTitle As String
Dim iResult As Integer

iFileHandle = FreeFile
strErrorTitle = App.EXEName & " : " & Title
strErrorLog = App.Path & "" & App.EXEName & ".log"
' Force error loging on all critical messages
If (Buttons And vbCritical) Then
LogToFile = True
End If
' if the user has choosen to log, or it's a critical message, log it
If LogToFile = True Then
Open strErrorLog For Append As #iFileHandle
Print #iFileHandle, Now, Prompt
Close #iFileHandle
End If
' Call the real message box routine
iResult = VBA.MsgBox(Prompt, Buttons, strErrorTitle, HelpFile, Context)
MsgBox = iResult
End Function

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 65 times

Categories

ASP/ HTML

Attachments

No attachments for this post


Loading Comments ...

Comments

No comments have been added for this post.

You must be logged in to make a comment.