my function does not return the value. how do i make this work? i want to return value to btt1process => browser , and btt2url => url , unfortunately it does not return
s2 = "Chrome"
s3 = "www.google.com"
Code
Public btt1task, btt2task, btt3task as string
Public btt1process, btt2process, btt3process as string
Public btt1url, btt2url, btt3url as string
Code button:
Dim userMsgBrowser As String = "Chrome"
Dim userMsgAdressName As String = "www.google.com"
If btt1task = "yes" Then
TaskNewProcessKey(btt1task, btt1process, btt1url)
ElseIf btt2task = "yes" Then
TaskNewProcessKey(btt2task, btt2process, btt2url)
End If
Code:
Public Function TaskNewProcessKey(s1, s2, s3 As String) As String
Dim userMsgBrowser As String = "Chrome"
Dim userMsgAdressName As String = "www.google.com"
If s1 = "yes" Then
s1 = "ProcessURL"
s2 = InputBox("what is your browser? please enter the process browser name, or press ok for to continue with the default browser (Chrome.exe), set by default", "Process Browser Name",)
If s2.Length < 1 Then
s2 = "Chrome"
End If
s3 = InputBox("what is your adress url?", "Process Adress URL",)
If s3 < 1 Then
s3 = "www.google.com"
End If
End If
Return s1
Return s2
Return s3
End Function
testing:
Messagebox.Show(btt1task)
Messagebox.Show(btt1process)
Messagebox.Show(btt1url)
Expected output:
Messagebox.Show(btt1task) => "yes"
Messagebox.Show(btt1process) => "Chrome"
Messagebox.Show(btt1url) => "www.google.com"