Thread: [Solved] trouble with code
View Single Post
 
Old 04-17-2018, 11:19 AM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

You need to deal with Term prior to getting to this point in your code.
This should give an idea...
Code:
Sub Testing()

Dim Term As Variant

'don't know how your variable is being assigned so...
    Term = " "
'check if its a date
    If Not IsDate(Term) Then
        'assign a date
        Term = DateSerial(1900, 1, 1)
    End If
    
'message box to show what Term currently is
    MsgBox Term

End Sub
Reply With Quote