PDA

View Full Version : Solved: Just a bit stuck



marcodevoto
10-30-2007, 02:40 PM
I have the following to save a work book to a specific loc with a cell value & current date used as the file name

Option Explicit
Sub SvMe()


Dim newFile As String, fName As String

fName = Range("A1").Value

newFile = fName & " " & Format$(Date, "mm-dd-yyyy")

ChDir _
"C:\Documents and Settings\ USER NAME \Desktop"
ActiveWorkbook.SaveAs Filename:=newFile

End Sub
But how do i get it to use the range from two cells + date????
Can any one help:banghead:

Nurofen
10-30-2007, 03:06 PM
does it save A1?

What are the two cell ranges you would like to save + time range ?

mikerickson
10-30-2007, 03:24 PM
perhaps


fName = Range("A1").Value & Range("b2").Value & Date
(Date is the VB equivilant of the spreadsheet function TODAY.)

marcodevoto
10-30-2007, 03:35 PM
Yes
fName = Range("A1").Value & Range("b2").Value
does just what i req
thankyou
1st time here saved ell of a day tomorrow
:bow: