O argumento não é opcional

Estava compilando o macro e deu um erro falando " Erro de execução BASIC. O argumento não é opcional." Nao to entendendo o porque.

Function DMS2Real(Degree_DMS As String) As Double  

    Dim degrees As Double
    Dim minutes As Double
    Dim seconds As Double
    Dim sign As Integer

    degrees = Val(Left(Degree_DMS, InStr(1, Degree_DMS, " ° ") - 1)) 'o erro está aparecendo aqui"
    
    If degrees < 0 Then
        degrees = degrees * -1
        sign = -1
    Else 
        sign = 1
    End If

    minutes = Val(Mid(Degree_DMS, InStr(1, Degree_DMS, "°") + 2, InStr(1, Degree_DMS, "'") - InStr(1, Degree_DMS, "S") - 2)) / 60
   
    seconds = Val(Mid(Degree_DMS, InStr(1, Degree_DMS, "'") + 2, Len(Degree_DMS) - InStr(1, Degree_DMS, "'") - 2)) / 3600
    DMS2Real =  sign * (degrees + minutes + seconds)
End Function

@Caiobba seja bem vindo.

Segue adaptação

Function DMS2Real(Degree_DMS As String) As Double  

    Dim Texto as String
    Dim degrees As Double
    Dim minutes As Double
    Dim seconds As Double
    Dim sign As Integer
	
	Texto = Degree_DMS 'acrescentado esta variável para receber o conteúdo da célula
	
    Texto = Left(Texto, InStr(1, Texto, " °") - 1) 'extração do símbolo graus
    
    degrees = cdBl(Texto) 'conversão do texto em double

    If degrees < 0 Then
        degrees = degrees * -1
        sign = -1
    Else 
        sign = 1
    End If

    minutes = Val(Mid(Texto, InStr(1, Texto, "°") + 2, InStr(1, Texto, "'") - InStr(1, Texto, "S") - 2)) / 60

    seconds = Val(Mid(Texto, InStr(1, Texto, "'") + 2, Len(Texto) - InStr(1, Texto, "'") - 2)) / 3600
    DMS2Real =  sign * (degrees + minutes + seconds)
End Function

Valeu pela ajuda…