+ Reply to Thread
Results 1 to 3 of 3

File not saving in folder user selects - and not closing.

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Florida
    MS-Off Ver
    Home -Excel 2007, Work 2016
    Posts
    254

    File not saving in folder user selects - and not closing.

    Sub SaveAnyFile()
    MsgBox "Next you will be asked to select the job folder. You will not be asked to name the file as that will be automatic so there wil be continuity in the file names."
    Dim folder, name As String
    On Error Resume Next
    name = ThisWorkbook.name
    With Application.FileDialog(msoFileDialogFolderPicker)
    .Title = "Please select a folder"
    .AllowMultiSelect = False
    .Show
    folder = .SelectedItems(1)
    End With
    ThisWorkbook.SaveAs ThisWorkbook.Path & Application.PathSeparator & Sheet1.Range("c11") & " - " & Sheet1.Range("C13") & " - " & Sheet1.Range("$C18") & ".xlsm"
    Workbook.Close
    End Sub

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: File not saving in folder user selects - and not closing.

    ActiveWorkbook.Close

  3. #3
    Forum Contributor
    Join Date
    07-02-2012
    Location
    Florida
    MS-Off Ver
    Home -Excel 2007, Work 2016
    Posts
    254

    Re: File not saving in folder user selects - and not closing.

    Thanks for solving the Not Closing problem- sometimes I miss the obvious

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. User selects folder the file will be save in
    By ILoveStMartin in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-05-2021, 08:53 PM
  2. Looking for saving in different folder at specific time, closing and re-opening help
    By epsilonindi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2020, 06:36 PM
  3. [SOLVED] Excel selects cells by itself upon saving the file
    By villiansv in forum Excel General
    Replies: 7
    Last Post: 05-02-2020, 09:00 AM
  4. Macro that Selects Specific Excel Worksheets to a PDF file & Saves to the User's Desktop
    By Excel Wet Behind Ear in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-31-2013, 01:15 PM
  5. [SOLVED] Save As Dialog Box - Default Path and File Name, User Selects Sub Folder from Default Path
    By christenprochaska in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-12-2012, 05:17 PM
  6. Userform - stop user saving or closing form is not complete
    By denise6372 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-18-2012, 12:24 AM
  7. [SOLVED] User Selects File- That file is copied to a sheet
    By FancyCorndog in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-09-2012, 05:31 PM

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