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 = quot;Labor-Work-mth-yrquot;
I would like to have fname appear as Labor-Work-01-2006.Thanks!!
fname = quot;Labor-Work-quot; amp; Format(mth,quot;00quot;) quot;-quot; % Format(yr,quot;0000quot;)
--
HTH
Bob Phillips
(remove nothere from the email address if mailing direct)
quot;Vispyquot; gt; wrote in message
...
gt; Hello,
gt;
gt; Does anyone know how to used a variable in a name?
gt;
gt; My example would by:
gt;
gt; ' fname is short for the name to be given to the newly saved file.
gt; Dim fname$
gt; ' dt is short for the date.
gt; Dim dt$
gt; ' mth is short for the month.
gt; Dim mth$
gt;
gt; mth = 1
gt; yr = 2006
gt;
gt; fname = quot;Labor-Work-mth-yrquot;
gt;
gt; I would like to have fname appear as Labor-Work-01-2006.
gt;
gt;
gt; Thanks!!
gt;
gt;
fname = quot;Labor-Work-quot; amp; mth amp; quot;-quot; amp; yr
gt; mth = 1
gt; yr = 2006
gt;
gt; fname = quot;Labor-Work-mth-yrquot;
gt;
gt; I would like to have fname appear as Labor-Work-01-2006.
--
Kevin Vaughnquot;Vispyquot; wrote:
gt; Hello,
gt;
gt; Does anyone know how to used a variable in a name?
gt;
gt; My example would by:
gt;
gt; ' fname is short for the name to be given to the newly saved file.
gt; Dim fname$
gt; ' dt is short for the date.
gt; Dim dt$
gt; ' mth is short for the month.
gt; Dim mth$
gt;
gt;
gt;
gt; Thanks!!
gt;
gt;
gt;
Thanks to Bob amp; Kevin!!
quot;Vispyquot; gt; wrote in message
...
gt; Hello,
gt;
gt; Does anyone know how to used a variable in a name?
gt;
gt; My example would by:
gt;
gt; ' fname is short for the name to be given to the newly saved file.
gt; Dim fname$
gt; ' dt is short for the date.
gt; Dim dt$
gt; ' mth is short for the month.
gt; Dim mth$
gt;
gt; mth = 1
gt; yr = 2006
gt;
gt; fname = quot;Labor-Work-mth-yrquot;
gt;
gt; I would like to have fname appear as Labor-Work-01-2006.
gt;
gt;
gt; Thanks!!
gt;
You're welcome. Although I did miss the 0 before the month part.
--
Kevin Vaughnquot;Vispyquot; wrote:
gt; Thanks to Bob amp; Kevin!!
gt;
gt; quot;Vispyquot; gt; wrote in message
gt; ...
gt; gt; Hello,
gt; gt;
gt; gt; Does anyone know how to used a variable in a name?
gt; gt;
gt; gt; My example would by:
gt; gt;
gt; gt; ' fname is short for the name to be given to the newly saved file.
gt; gt; Dim fname$
gt; gt; ' dt is short for the date.
gt; gt; Dim dt$
gt; gt; ' mth is short for the month.
gt; gt; Dim mth$
gt; gt;
gt; gt; mth = 1
gt; gt; yr = 2006
gt; gt;
gt; gt; fname = quot;Labor-Work-mth-yrquot;
gt; gt;
gt; gt; I would like to have fname appear as Labor-Work-01-2006.
gt; gt;
gt; gt;
gt; gt; Thanks!!
gt; gt;
gt;
gt;
gt;
- Aug 28 Tue 2007 20:39
Using variables in a name
close
全站熱搜
留言列表
發表留言