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)?
 

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