Avatar of hendrkle
hendrkle
 asked on

Excel macro to create string from cell value

Dear Experts,

I have found the following code to open a website for me at http://mywebsite.

Sub Website_Open()
    Dim i As Long
    Dim IE As Object
    Dim objElement As Object
    Dim objCollection As Object
 
    Set IE = CreateObject("InternetExplorer.Application")
 
    IE.Visible = False
 
    IE.Navigate "http://mywebsite"
    
End Sub

Open in new window


I would like to change the address string to concatenate with the currently selected cell and a static value of "}". For example, when the currently selected cell value is (without the quotation marks) "product1", I would like to URL to become:

http://mywebsite + product1 + }

so, altogether: "http://mywebsiteproduct1}" is what I am looking for.

Any guidance is much appreciated!

Thanks


   
Microsoft ExcelVB Script

Avatar of undefined
Last Comment
hendrkle

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Chris Bottomley

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
hendrkle

ASKER
Perfect!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy