Thread: [Solved] trouble with code
View Single Post
 
Old 04-19-2018, 12:26 PM
gummybear gummybear is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Apr 2018
Posts: 9
gummybear is on a distinguished road
Default trouble with code

Quote:
Originally Posted by NoSparks View Post
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

I ran your code and it answered my question. Thank you so much.
Reply With Quote