Convert the characters in the html and replace them ----vba

LUCYlorna

New Member
Joined
Jul 8, 2014
Messages
2
I WANT TO NAVIGATE TO A PAGE OF A WEBSITE BUT THE HTML IS DYNAMIC THEN I WANT TO CONVERT THE CHARACTERS IN THE HTML AND REPLACE THEM BY THE HEX
Here is the charaters i want to replace it is a tab ! " # $ % & ' ( ) * + , - . / here is the characters i want to have instead 21% 22% 23% 24% 25% 26% 27% 28% 29% %2A %2B %2C %2D %2E %2F
here is the column or tab with the strings I want to modify
977 B.C. Ltd. - 478 30 B.C. Ltd - 608 1tario Ltd. - 40456 1077369 Ontario Inc - 40920
LINKS TO CHANGE for example ://ptest.vire.ca/AgotesEdit.asp?ID=Leux, Luen- C918submit = Edit + Journal ://ptest.vire.ca/AgotesEdit.asp?ID=Services financiers Michel Kirouac inc. - C2944submit = Edit + Journal
LINKS I WANTS ://ptest%2Evire%2Eca/AgotesEdit%2Easp?ID=Ledoux%2C Lucien%2d C3918submit = Edit + Journal ://ptest%2Evire%2Eca/AgotesEdit%2Easp?ID=Service %2G%s financiers %2G% Michel Kirouac %2G%inc%2E %2d C2944submit = Edit + Journal
HERE IS MY CODE
sub test()
' Macro to Login to Virtgate if not already logged in --Open Virtgate
Set IE = CreateObject("InternetExplorer.Application")
With IE .Visible = True .navigate "mainpage"
' Loop until the page is fully loaded Do Until Not .Busy And IE.readyState = 4 DoEvents Loop
' Enter ID and password and submit them

<code style="margin: 0px; padding: 0px; border: 0px; vertical-align: baseline; font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; white-space: inherit; background-image: initial; background-attachment: initial; background-size: initial; background-origin: initial; background-clip: initial; background-position: initial; background-repeat: initial;"> Application.Wait Now + TimeValue("00:00:2") IE.document.forms(0).submit Do Until Not .Busy And IE.readyState = 4 DoEvents Loop Application.Wait Now + TimeValue("00:00:2")</code></pre>' Navigate to the main Journal Edit page ' example ://ptest.vire.ca/AgotesEdit.asp?ID=Leux, Luen- C918&submit=Edit+Journal
Dim broker As String
.navigat "://ptest.vire.ca/AgotesEdit.asp?ID=" & Names & "submit = Edit + Journal"
end sub
Thank you for your help
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
For example, let’s say that i have a column of search words (or phrases) that should link to the url page for each search. How would you do it? knowing that the first colunm is the initial character in the url and the 2nd colunm is the final characters. In the 3rd column is my current URL and I want to be able to build the URL in a separate column. Thk u
 
Upvote 0

Forum statistics

Threads
1,215,444
Messages
6,124,893
Members
449,194
Latest member
JayEggleton

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top