VB问题:路径名中要包含变量如何写代码?
来源:百度知道 编辑:UC知道 时间:2024/06/18 04:48:38
如题
谢谢!
谢谢!
例子1:
dim mFileName as String
dim mFilePath as String
mFile="abc.jpg"
mFilePath="c:\" & mFile
例子2:
mFile="abc.jpg"
mFilePath=App.Path '或者 mFilePath = "c:\Temp"
mFilePath=mFilePath & "\" & mFile
Dim Path as string
Dim File as string
Path="c:\Office\"
File="Office.exe"
Url=Path & File
变量转成字符串,用字符串连接符连起来就可以了。