Código [Seleccionar]
Private Function hola(x As String) As String
Dim t() As String
t = Split(x, "%")
hola = Environ(t(1)) & t(2)
End Function
y lo usas
Código [Seleccionar]
Private Sub Command1_Click()
MsgBox hola("%windir%\system32\cmd.exe")
End Sub