How to concatenate a literal string and a variable value?

  • Thread starter Thread starter Tony Bansten
  • Start date Start date
T

Tony Bansten

Assume I want to concatenate a literal text value and a variable value for a function parameter
then the following does NOT work:

objWorkbook.SaveAs("D:\work\v1_" + Filename)

The variable "Filename" is filled with a valid value.

So how do I otherwise concatenate two parts?

Tony
 
What is the object type for "FileName"

Do you have
OPTION EXPLICIT ON
OPTION STRICT ON

or do you have

dim Filename
(which means dim Filename as object)
............

or do you have ?
dim fileName as string

Are you using VB.NET?

If you're not, then why are you posting to a VB.NET newsgroup
(microsoft.public.dotnet.languages.vb)?
 
Back
Top