Consulting

Results 1 to 4 of 4

Thread: Solved: Just a bit stuck

  1. #1

    Solved: Just a bit stuck

    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 AsString, fName AsString

    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

  2. #2
    does it save A1?

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

  3. #3
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    perhaps

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

  4. #4

    Great

    Yes
    fName = Range("A1").Value & Range("b2").Value
    does just what i req
    thankyou
    1st time here saved ell of a day tomorrow

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •