Using variables in a name

  • Thread starter Thread starter Vispy
  • Start date Start date
V

Vispy

Hello,

Does anyone know how to used a variable in a name?

My example would by:

' fname is short for the name to be given to the newly saved file.
Dim fname$
' dt is short for the date.
Dim dt$
' mth is short for the month.
Dim mth$

mth = 1
yr = 2006

fname = "Labor-Work-mth-yr"

I would like to have fname appear as Labor-Work-01-2006.


Thanks!!
 
fname = "Labor-Work-" & Format(mth,"00") "-" % Format(yr,"0000")

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top