DragonRyda
New Member
- Joined
- Sep 19, 2016
- Messages
- 8
Hello all,
I am a definite newby to all this, so please be gentle with me! I haven't done programming really since back on the Commodore 64. Some of this seems intuitive, some just does my head in.
I have the following code:
Sub GetDate()
'set colours for pass/fail validations
ok = 42
notok = 46
'
' Input box ensuring advanced find is open and obtaining batch date
On Error Resume Next
BD = InputBox("Please ensure you have already opened the Advanced Find, found under 'Claim Items'. Then, please enter the batch date you are working on in 'dd/mm'yyyy'format.")
If IsDate(BD) = True Then Macro1
Else: If BD = "" Then Exit Sub
Else: If IsDate(BD) = False Then
MsgBox ("Please enter the date as dd/mm/yyyy")
Call GetDate
End If
Exit Sub
End Sub
What i am trying to achieve is to get the batch date from the user. If it's a date, go to Macro 1. If cancel was entered, then stop programme. If something other than date was entered, tell them to enter date correctly, and restart. I feel like I must be close. I have tried numerous versions, but no success. I have DIM BD as Date. Any help would be gratefully appreciated.
I am a definite newby to all this, so please be gentle with me! I haven't done programming really since back on the Commodore 64. Some of this seems intuitive, some just does my head in.
I have the following code:
Sub GetDate()
'set colours for pass/fail validations
ok = 42
notok = 46
'
' Input box ensuring advanced find is open and obtaining batch date
On Error Resume Next
BD = InputBox("Please ensure you have already opened the Advanced Find, found under 'Claim Items'. Then, please enter the batch date you are working on in 'dd/mm'yyyy'format.")
If IsDate(BD) = True Then Macro1
Else: If BD = "" Then Exit Sub
Else: If IsDate(BD) = False Then
MsgBox ("Please enter the date as dd/mm/yyyy")
Call GetDate
End If
Exit Sub
End Sub
What i am trying to achieve is to get the batch date from the user. If it's a date, go to Macro 1. If cancel was entered, then stop programme. If something other than date was entered, tell them to enter date correctly, and restart. I feel like I must be close. I have tried numerous versions, but no success. I have DIM BD as Date. Any help would be gratefully appreciated.