Skeggjold
02-24-2014, 10:30 AM
I know this is possible just do not know how to make the variable or formula.
I have a server list. Thousands of servers. So I have a C collumn with the list of servers. B collum would be the IP's etc. etc.
What I would like to is put a button , Macro or hyper link in collumn a. That once someone clicks on it a webpage with that servers info comes up from a internal webpage. The VB script I made for it works.
My Question is how do I automate that script for each server on the list. Without having to write the vb code for each server?
This is the VB script.
Sub RFC()
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Top = 0
objIE.Left = 0
objIE.Width = 800
objIE.Height = 600
objIE.AddressBar = 0
objIE.StatusBar = 0
objIE.Toolbar = 0
objIE.Visible = True '
objIE.Navigate ("Htt.... code ")
Do
DoEvents
Loop Until objIE.ReadyState = 4
objIE.document.getelementbyID("RFCCriteria").Value = "KSCPNSRV01"( this value would change per row)
objIE.document.getelementbyID("submit").Click
Do
Loop Until objIE.ReadyState = 4
End Sub
Sub X()
Dim RetVal
RetVal = Shell("c:\reports\6152.auto", 1)
End Sub
The value which is KSCPNSRV01 would change for each server.
I have a server list. Thousands of servers. So I have a C collumn with the list of servers. B collum would be the IP's etc. etc.
What I would like to is put a button , Macro or hyper link in collumn a. That once someone clicks on it a webpage with that servers info comes up from a internal webpage. The VB script I made for it works.
My Question is how do I automate that script for each server on the list. Without having to write the vb code for each server?
This is the VB script.
Sub RFC()
Set objIE = CreateObject("InternetExplorer.Application")
objIE.Top = 0
objIE.Left = 0
objIE.Width = 800
objIE.Height = 600
objIE.AddressBar = 0
objIE.StatusBar = 0
objIE.Toolbar = 0
objIE.Visible = True '
objIE.Navigate ("Htt.... code ")
Do
DoEvents
Loop Until objIE.ReadyState = 4
objIE.document.getelementbyID("RFCCriteria").Value = "KSCPNSRV01"( this value would change per row)
objIE.document.getelementbyID("submit").Click
Do
Loop Until objIE.ReadyState = 4
End Sub
Sub X()
Dim RetVal
RetVal = Shell("c:\reports\6152.auto", 1)
End Sub
The value which is KSCPNSRV01 would change for each server.