I've been looking tutorials and examples of setting the value field of a input tag. I'm trying to enter two IP addresses into the text fields on this website, under IP Range To CIDR. But my code won't enter anything.
There's no ID tag, so I can't use the getElementById method.
Dim url As String Sub ConvertIPRangeToCIDR() Dim IE As InternetExplorer Set IE = New InternetExplorerMedium With IE .Visible = True url = "https://www.ipaddressguide.com/cidr" .navigate (url) While IE.Busy DoEvents Wend Dim Elements As Object Set Elements = IE.Document.getElementsByTagName("input") For Each Element In Elements If Element.Name = "ipFrom" Then Element.Value = "184.108.40.206" Exit For End If Next Element End With End Sub
From tutorials this looks easy, but I've been trying different things and nothing is working.