Consulting

Results 1 to 5 of 5

Thread: Solved: A "Browse" option for File Save?

  1. #1
    VBAX Regular
    Joined
    May 2007
    Posts
    81
    Location

    Solved: A "Browse" option for File Save?

    Gurus,

    Any code lying around the place that allows a "Browse" option for choosing the path you save a file to
    Kindest Regards,
    Mike

    I love to Excel

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Look at GetSaveAsFilename in VBA Help.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Moderator VBAX Guru Ken Puls's Avatar
    Joined
    Aug 2004
    Location
    Nanaimo, BC, Canada
    Posts
    4,001
    Location
    I'm trying to remember if GetSaveAsFilename always worked... was it in existence in Office 97? Probably not an issue anymore anyway, but here is an alternative.
    Ken Puls, CMA - Microsoft MVP (Excel)
    I hate it when my computer does what I tell it to, and not what I want it to.

    Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar

    This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!

    Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!





  4. #4
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Following on Bob's suggestion. Change the Z:\Temp part to reflect the directory where you wish to start browsing:
    [vba]Option Explicit
    Sub a()
    Dim FName As Variant
    FName = Application.GetSaveAsFilename(InitialFileName:="Z:\Temp")
    If FName = False Then
    'Cancel
    Else
    ActiveWorkbook.SaveAs Filename:=FName, FileFormat:=xlNormal
    End If
    End Sub[/vba]
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  5. #5
    VBAX Regular
    Joined
    May 2007
    Posts
    81
    Location
    Thank You Gurus
    Kindest Regards,
    Mike

    I love to Excel

Posting Permissions

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