Vbs combining consts

This is a quick (and probably stupid) question, but if I have two lines of consts, how can I build the next const from the previous const ie

Const PATH_SRC = "some path\"
Const PATH_SRC_FILES = PATH_SRC & "files\"

I know you can say that const is a constant, but is looking for a quick solution. This is executed in a vbs script.

thank

+3
source share
2 answers

If I remember my VBS days correctly; You cannot do this in VBS. A constant can only be set to a literal.

+8
source

It is possible!

Const PATH_SRC = "some path\"
execute "Const PATH_SRC_FILES =""" & PATH_SRC & "files\" & """"
msgbox PATH_SRC_FILES
+3
source

All Articles