Results 1 to 2 of 2

Date Issue (Excel VBA)

Threaded View

lloydgodin Date Issue (Excel VBA) 05-17-2012, 03:11 PM
lloydgodin Re: Date Issue (Excel VBA) 05-17-2012, 04:47 PM
  1. #1
    Forum Contributor
    Join Date
    03-22-2012
    Location
    OR, USA
    MS-Off Ver
    Excel 14/2010
    Posts
    273

    Date Issue (Excel VBA)

    I know Excel uses numbers for dates but the code below is not working...

        
        Dim erdate As String
    
    valid = False
        Do Until valid = True
        erdate = Application.InputBox(prompt:="Enter E.R. Date", Title:="E.R. Date", Left:=300, Top:=250, Type:=2)
        If erdate <> Empty And erdate <> "False" Then
                valid = True
            End If
        Loop
        
    '***** Begin ER date validation
    '*      If ER Date is not between 07/01/08 & 11/30/10 then Exit Sub
    '*
    '*
        erdate = CDate(erdate)
        Select Case erdate
            Case 39630 To 40512
            Case Else
                MsgBox ("Please select Appropriate Analysis Spreadsheet for the Date of Service")
                Application.StatusBar = "Ready"
                Exit Sub
        End Select
    Last edited by lloydgodin; 05-17-2012 at 04:40 PM. Reason: added dim value

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1