0

I'm trying to modify a link "URL link" using VBA Excel to extract specific Value from Site .

Below the Type of link :

URLhttp://Confidential.eu.airbus.Confidential:Confidential/Confidential/consultation/preViewMP.do?mpId=XXXXXX

What I want is to change mpID=XXXXX with sheet("Feuil1").range("A1").valuebut I didn't succeed , I don't have the right knowledge

So I don't have a clue how to manipulate this URL to open what I enter in range("A1") and look for specific line there and Copy and Past it in my excel File

Anyone could light me with some idea or help to better code this ?

1 Answer 1

1

You can get the string from A1 using

Dim str As String: str = ThisWorkbook.Sheets("Feuil1").Range("A1").Value

Then create the URL from what you've stated

Dim myURL as String
' The & symbol concatenates strings. The _ symbol is for line continuation.
myURL = "http://Confidential.eu.airbus.Confidential:Confidential/Confidential/" _
        & "consultation/preViewMP.do?" & str
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.