savings files with the use of variables
what you need to know (I suppose) is:
you can create new constantes:
const toto="my name"
you can add strings:
example: "abc" & toto
will gives "abcmy name"
so you can construct complex filenames this way
do remember to take care of the "\" in the name !
example: complete = folder & "\" & filename
if the folder string do not already finished with a "\"
you can also put the name of the file and/or folder in
1- a text box in the form
2- or in a special (config) sheet ot cell of your excel file.
the point 2 can be efficient because this will gives always the good
name for differents files. (the name is in the file)
Sometimes when one of my workbooks need special config data I never
hesitate to add a special node "config" with (in your case) the name and
folder of the wanted file. But the form is ok to.
|