Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim Server As String, FileName As String, User As String 'Server, File name & User name variables
Dim objFSOps As IADsFileServiceOperations 'File Service Operations variable
Dim objResource As IADsResource 'Resource variable
Dim FindPos As Long 'Position variable
Set objFSOps = GetObject("WinNT://" & Server & "/LanmanServer") 'Open object that contains Server resources
If IsEmpty(objFSOps) = False Then 'Check to see if Server resources exist
For Each objResource In objFSOps.Resources 'Loop through the resources on the server
If (Not objResource.User = "") And (Not Right(objResource.User, 1) = "$") Then 'Check for user be empty
'Check value of Option buttons
If optFileName.Value = True Then
FindPos = InStr(1, objResource.Path, FileName, 1) 'Retrieve position of file name from the path
Else
FindPos = InStr(1, objResource.User, User, 1) 'Retrieve position of user name from the user
End If
If FindPos <> 0 Then 'Check to see if file position is not 0
'Enter file user and file path to the Search Results text box
frmSearchResults.txtSearchResults.Text = frmSearchResults.txtSearchResults.Text & objResource.User & " --- " & objResource.Path
'Add new line to bottom of the Search Results text box
frmSearchResults.txtSearchResults.Text = frmSearchResults.txtSearchResults.Text & vbNewLine
'Refresh the Search Results form
frmSearchResults.Refresh
End If
End If
Next
End If