Excel macro to create string from cell value

hendrkle
hendrkle used Ask the Experts™
on
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


   
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software Quality Lead Engineer
Top Expert 2011
Commented:
Try:

IE.Navigate "http://mywebsite" + activecell.text + "}"

Chris

Author

Commented:
Perfect!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial