View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave F Dave F is offline
external usenet poster
 
Posts: 2,574
Default Concatenate & Date

Well, if you were using CONCATENATE in the workbook, your function should
look like this: =CONCATENATE(DATE(2006,9,1),"ProjectName") --
9/1/2006ProjectName

I imagine it's similar in VBA.

Dave
--
Brevity is the soul of wit.


"General Specific" wrote:

I am trying to create a macro that saves a spreadsheet to a name based
on data in a few cells.

For example, if I have Date and ProjectName in two cells, I want the
macro to save the worksheet as DateProjectName.csv.

I tried to Concatenate these values into one cell. From there I was
goint to use the following the Save As that value using:

Public Sub SaveAsA1()
ThisFile = Range("A1").Value
ActiveWorkbook.SaveAs Filename:=ThisFile
End Sub


Concatenate changes the date to a string returning 38936ProjectName.
What is going on here?

Anyone have a better way to do this?