Skip to main content

Good day everyone,

I am having trouble trying to figure out how to get a prompt to pop up for me to enter some values. and then those values will be used later on in the script.

For example, I need to insert 4 different dates at a certain point in my script, and instead of pausing the script so I can manually insert them, it would be nice if I could prompt for them at the start, and it will automatically insert them. as the script goes.

I would just use a format date line, but unfortunately these are fiscal dates, which changes for every month, every year.

Would anyone be able to help me out?

 

As always, thanks in advance.


#Rumba

Good day everyone,

I am having trouble trying to figure out how to get a prompt to pop up for me to enter some values. and then those values will be used later on in the script.

For example, I need to insert 4 different dates at a certain point in my script, and instead of pausing the script so I can manually insert them, it would be nice if I could prompt for them at the start, and it will automatically insert them. as the script goes.

I would just use a format date line, but unfortunately these are fiscal dates, which changes for every month, every year.

Would anyone be able to help me out?

 

As always, thanks in advance.


#Rumba
I was able to use this, but is there a simpler less tedious way to do so?

Sub Main
EMCONNECT "A"

Dim Date1 As String , Date2 As String, Date3 As String, Date4 As String
DlgStart
DlgItemType "Enter This Year From, Example: 051519"
DlgItemAsk "", Date1, 1, 10
DlgInquire
DlgGetItemValue 1 , Date1
DlgEnd

DlgStart
DlgItemType "Enter This Year To, Example: 051519"
DlgItemAsk "", Date2, 1, 10
DlgInquire
DlgGetItemValue 1 , Date2
DlgEnd

DlgStart
DlgItemType "Enter Last Year From, Example: 051519"
DlgItemAsk "", Date3, 1, 10
DlgInquire
DlgGetItemValue 1 , Date3
DlgEnd

DlgStart
DlgItemType "Enter Last Year To, Example: 051519"
DlgItemAsk "", Date4, 1, 10
DlgInquire
DlgGetItemValue 1 , Date4
DlgEnd


EMWriteScreen Date1, 4, 41
EMWriteScreen Date2, 4, 59
EMWriteScreen Date3, 5, 41
EMWriteScreen Date4, 5, 59

End Sub