+ Reply to Thread
Results 1 to 3 of 3

Thread: saving as "date"

  1. #1
    Registered User
    Join Date
    02-01-2012
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    6

    saving as "date"

    Im very new to excel VB, hopefuly its obvious what im trying to do here, if sombody could just help me make it work..

    Sub SaveSheetpdf()
    Dim FileName As String
    
    FileName = Range("DriverName") & Range("Date")
    
    Range("A2:P59").ExportAsFixedFormat Type:=xlTypePDF, FileName:=FileName & ".pdf"
    
    End Sub
    THIS IS THE BIT I THINK IS CAUSING THE ERROR
    FileName:=FileName & ".pdf"

    I want to save a file as "cell DriverName" and "cell Date" .pdf

    Any help will be greatly received.
    Last edited by Solidstan; 02-08-2012 at 05:37 PM.

  2. #2
    Registered User
    Join Date
    02-01-2012
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: save as .pdf using more than 1 cell name

    I Think I may have found a clue, but still can't solve it.
    The "Date" cell is "19 February 2012" but the fx shows as 19/02/2012.
    Im sure the Back Slash in file names would cause a problem.
    Anybody know of a work around for this?

  3. #3
    Registered User
    Join Date
    02-01-2012
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: saving as "date"

    Sorry, didn't realise I had put this in the wrong place.
    Im still stuck with this, if somebody could help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0