VBAサンプル:タコユキ

パスを連結

Public Function mergePath$(a$, b$)

    Dim fso As New FileSystemObject
    mergePath = fso.BuildPath(a, b)
    Set fso = Nothing
    
End Function

~~~ 結果 ~~~ 

?mergePath( "aa","b")
aa\b

?mergePath( "aa\","b")
aa\b

/* -----codeの行番号----- */