Good Morning All,
I am currently automating a process where we pull reports off of different servers. Right now I have a user input box that asks them to enter the IP Address of the Server. I would like it to show up with a little drop down so they can select the server from the list instead of typing in the whole IP Address and also if possible in the Drop Down list I would like it to show the ServerName instead of the IP so people don't have to look up which server is which. For Example the servers are:
IP Name
123.456.789 ABC Server
456.789.123 DEF Server
789.123.456 GHI Server
I would like the list to have the server name but when it goes to conect I need it to use the IP address.
This is the current Input Box code I am using.
CMSServer = Application.InputBox("Enter Server Wanted:")
I assign variables.
I then have it check to ensure you are not already connected to that server. If the application is open it pulls the report. If it isn't it logs in using login password entered by user.
Do Until svCount = cmsApp.Servers.Count Or Not cmsServIdx = 0
svCount = svCount + 1
If cmsApp.Servers.Item(svCount).Name = myServ Then
cmsServIdx = svCount
Set cmsServ = cmsApp.Servers.Item(svCount)
End If
Loop
If cmsServIdx = 0 Then
Set cmsServ = CreateObject("ACSUPSRV.cvsServer")
Set cmsConn = CreateObject("ACSCN.cvsConnection")
cmsConn.bAutoRetry = True
If cmsApp.CreateServer(myLog, myPass, "", myServ, False, "ENU", cmsServ, cmsConn) Then
If cmsConn.Login(myLog, myPass, myServ, "ENU", "", False) Then
End If
End If
svCount = cmsApp.Servers.Count
Do Until svCount = 0
If cmsApp.Servers.Item(svCount).Name = myServ Then cmsServIdx = svCount
svCount = svCount - 1
Loop
End If
Bookmarks