Update Value on Web Page via Excel Macro

Mark123456789

New Member
Joined
Feb 23, 2013
Messages
14
Hello


I have been fighting with a problem for a while with no success.


I want to update a field on a webpage via excel vba.


I am using IE11.


Below is a picture of the source code of the page in question.


I want to update the Value from 29 to 31 for example.


I have tried getelementsby ID or tagname none of which works.


Can anyone help?


Thank you

<input class="form-control" id="Input_Value" onblur="showUpdateModalCalcTotal(0)" type="text" value="29.00">

<xxxinput class="form-control" id="Input_Value" onblur="showUpdateModalCalcTotal(0)" type="text" value="29.00" xxx="">

input class="form-control" id="Input_Value" onblur="showUpdateModalCalcTotal(0)" type="text" value="29.00"</xxxinput>
 
Last edited:
Hi Domenic

I was hoping I could pick your brain again if you had some time.

I am trying to get some information from an internal intranet webpage.

I use a bit of vba code to load the page (listed below).

To get the information, I need to click a link which opens a list tree on the left side of the same page.

I then click an item on the tree list which expands to several sub items.

From this sub list of items, I need to extract a value.

Since all the data is on the same page I thought I could somehow extract the value I’m interested in directly – but I’m, struggling.

The HTML code behind the value I need is as follow:-

Xxx div style="cursor: pointer;" *******="OpenPage('_faultlist.aspx?guid=1&mode=teams&id=WWE410&value=P+B+R', 'iframe2');">PBR (4,0) xxxx

(Replace Xxx with < and replace xxxx </div>)

I need to extract the value 4 from PBR (4,0).

I am struggling.

I thought I could use the getelement by Name/ID/Tag but no luck?

Do you think you shed any light?

Thank you.




Code to open website:-

Sub Test()
Dim IEapp As Object
Dim WebUrl As String


Set IEapp = CreateObject("InternetExplorer.Application") 'Set IEapp = InternetExplorer
WebUrl = "http://XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

With IEapp
.Silent = True 'No Pop-ups
.Visible = True 'Set InternetExplorer to Visible
.Navigate WebUrl 'Load web page
End With

End Sub
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Can you post an image of the relevant portion of the source code?
 
Upvote 0

Forum statistics

Threads
1,223,681
Messages
6,173,815
Members
452,535
Latest member
berdex

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