- 
	
	
		
		
			
				
				
						
						
				
					
						
							Your range includes empty cells, which we need to filter out by wrapping the Find function in an If...Then
I also neglected to check this properly, we need to make the find lookat the whloe cell text or someone can put in part of a valid login and succeed![VBA]Private Function ValidLogin(strName As String, strPW As String) As Boolean
    Dim c As Range
    
    If strName <> "" And strPW <> "" Then
        Set c = Range("usernames").Find(What:=strName, LookAt:=xlWhole)
        If Not c Is Nothing Then
            If c.Text = strName And c.Offset(0, 1).Text = strPW Then
                Set c = Nothing
                ValidLogin = True
            End If
        End If
    End If
End Function[/VBA]
						
					 
					
				 
			 
			
			
				
				
				
				
					K :-)

				
				
			 
			
			
		 
	 
		
	
 
		
		
		
	
 
	
	
	
	
	
	
	
	
	
	
	
	
		
		
			
				
				Posting Permissions
			
			
				
	
		- You may not post new threads
 
		- You may not post replies
 
		- You may not post attachments
 
		- You may not edit your posts
 
		-  
 
	
	
	Forum Rules