Results 1 to 3 of 3

Filename = Cell Contents

Threaded View

  1. #1
    Registered User
    Join Date
    11-06-2008
    Location
    Boston
    MS-Off Ver
    2003 SP3
    Posts
    42

    Filename = Cell Contents

    I would like to modify the below so that the contents of cell D2 of the current file becomes the file name.
    Thanks for any help

    Phil

    Sub FlattenSS()
    '
    ' FlattenSS Macro
    '
    ''
        ActiveSheet.Select
        ActiveSheet.Copy
        ActiveSheet.Unprotect
        Cells.Select
        Selection.Copy
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
        Range("A1").Select
        Application.CutCopyMode = False
        ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
     
        ChDir "C:\Documents and Settings\philip.marshall\Desktop"
        fileSaveName = Application.GetSaveAsFilename( _
        fileFilter:="Excel Files (*.xls), *.xls")
        If fileSaveName <> False Then
        MsgBox "Save as " & fileSaveName
        End If
        
        
    End Sub
    Last edited by davesexcel; 12-11-2008 at 08:15 AM. Reason: No Code Tags

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.6.0 RC 1