I could have sworn that this was working before - but for some reason, this doesn't appear to be working anymore. I'm trying to take the active worksheet (also, this may not be very pretty or clean, but I am still really new to VBA), copy it to a new worksheet, in the new worksheet I want to open the Excel save as dialog, and when the worksheet is saved (in CSV) format, I want the workbook to close (or even if it doesn't close) at least return the user to the original workbook and end the sub
Sub saveExportAs()
    Application.CutCopyMode = False
    Sheets("load").Select
    ActiveWorkbook.Activate
    Sheets("load").Copy
    Dim varResult As Variant
    Dim ActBook As Workbook
    'display the save as dialog
    varResult = Application.GetSaveAsFilename(InitialFileName:="\\network\folder\upload_" & Format(Date, "yyyy-mm-dd") & ".csv", FileFilter:= _
    "Comma Delimited / Upload Files (*.csv),*.csv", Title:="Save Upload File")
    'check to make sure the user didn't cancel
    If varResult <> False Then
        ActiveWorkbook.saveAs Filename:=varResult, _
        FileFormat:=xlCSV
        Exit Sub
    End If
End Sub
 
     
    