[RESOLVED] First User Form
I have a Userform Made. I need the code to call it with a togglebutton on the spreadsheet.
then I need the code that completes the Hyperlink as explained below.
LABEL<PROJ>TEXTBOX<ENTER PROJ NUMBER HERE> COMMANDBUTTON<HYPERLINK ACTIVATE>
I just need whatever is in the textbox to complete the hyperlink.
PREFIX "http://abc.mycmpny.com/abc_drw/qr/"&"textbox data".
http://abc.mycmpny.com/abc_drw/qr/049410-001
Commandbutton activate link.
Re: [RESOLVED] First User Form
I have a TextBox in my form and a Command Button calls a Hyperlink.
problem is Now I have a Hyperlink that needs FirstName LastName.
I would rather not Build 2 text boxes, and am wondering how you would go about splitting the entry seperated by a space, and then using the 2 sets of data in the HyperLink.
http://edirectory.mycompany.com/ldap...name=FirstName
Re: [RESOLVED] First User Form
This is what I have. It errors on the Hyperlink saying it needs a seperator or something. Also, I am not sure my split thing is working. Yea I don't think it should have Range there.
Code:
Private Sub CommandButton1_Click()
Dim lngOpenPage As Long
Dim First As Variant
Dim Last As Variant
First = Split("Textbox1.text", " ") 'Textbox1=John Doe
Last = Split("Textbox1.text", " ") 'Textbox1=John Doe
lngOpenPage = ShellExecute(Application.hwnd, "Open", "http://edirectory.MyCompany.com/ldap/CorpDirServlet?snMatch=exact&givennameMatch=exact&action=FindEmployee&sn=(Last)&givenname=(First)&MiddleInitial=&telephoneNumber=, 0&, 0&, 0&) 'It errors here saying I needed a Seperator or something. What are the 0&, 0&, 0& For?
End Sub
The Middle Initial and Telephone are not needed. I think I could actually take them off, but that is the way it shows up so.