I have this search string.
Dim files As String() = IO.Directory.GetFiles(\"\\\\192.168.0.2\\shares\\be\\\" & functiicomune.numeclient & \"\\\" & r &a
You could simplify first your code, and add parenthesis when calling the function :
Dim files As String() = IO.Directory.GetFiles("\\192.168.0.2\shares\be\" & functiicomune.numeclient() & "\" & r & " " & codnumeric & "*PROD\","*" & codnumeric & "*DECOMPOSITION*.pdf"
and second, check the values which compose the path or extension through your debugger :
functiicomune.numeclient
r
codnumeric