Thanks Tom
--
Dee
"Tom Lavedas" wrote:
> On Nov 23, 1:23 pm, Dee <D...@discussions.microsoft.com> wrote:
> > I'm trying to add a string to a number
> >
> > example
> >
> > number= "12345"
> >
> > I now want to add the below
> > DD_
> >
> > So it looks like this
> >
> > DD_1234
> >
> > When i run a msgbox, its fine
> > msgbox "DD_"&number
> >
> > but when I run a command like
> >
> > WShell.run "%COMSPEC% /C dir >> c:\temp\DD_"&"number"
> >
> > I get c:\temp\DD_number
> >
> > And not the actual number I want, it should be DD_12345
> >
> > Any thoughts
> > (Still newish to vb scripting)
> >
> > --
> > Dee
>
> When you put quotes around the variable's name, it becomes a literal
> string. Try this instead ...
>
> WShell.run "%COMSPEC% /C dir >> c:\temp\DD_"& number
>
> Tom Lavedas
> ==========
>
|