Domanda

I need to pass a variable inside a IE.navigate call in excel VBA. For example, my sample application will be something like this.

Enter the first name: "SACHIN"
Enter the last name:  "TENDULKAR"

I am storing the values of FN and LN in variables in my excel VBA. I need to navigate to the first page of google search results. I am able to navigate to the first page successfully if I hard code the values. If I give something like below,

ie.Navigate "http://www.google.com/search?hl=en&q=sachin+tendulkar+wiki&meta="

Instead of hard coding, I need to give the values from my application like below.

ie.Navigate "http://www.google.com/search?hl=en&q=&FirstName+&LastName+wiki&meta="

But the above method is not passing the excel VBA value into my ie.Navigate call. Can someone please help me out here?

Please let me know if you need more information.

Thanks & Regards, Ramesh

È stato utile?

Soluzione

ie.Navigate "http://www.google.com/search?hl=en&q=" & _
             FN & "+" & LN & "+wiki&meta="
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top