Search results for query: Filedialog

  1. Isaac

    Excel Save as

    It does for me. To truly early bind: - Reference set to Microsoft Office ##.# Object Library - Variable declared as Office.FileDialog then filters changes to Filters
  2. G

    Need to change export VBA to let user select folder location

    So I used the following code: Private Sub btnExportEvent_Click() Dim reportName As String Dim criteria As String Dim fd As FileDialog reportName = "CompletedForm" criteria = "[ComplaintNumber]= " & [Forms]![frmDetails]![ComplaintNumber] Set fd =...
  3. Sam Summers

    Solved Missing something in concatenation

    ...Me.EmployeeID) End Sub Public Function AddAttachment(strTableName, strAttachField, strIDfield As String, i As Long) Dim fd As FileDialog Dim oFD As Variant Dim strFileName As String Set fd = Application.FileDialog(msoFileDialogFilePicker) With fd .ButtonName =...
  4. P

    New Folder in Existing Project Folder

    ...Explicit Public Function fChooseFile() ' Requires reference to Microsoft Office 11.0 Object Library. Dim fDialog As Office.FileDialog Dim varFile As Variant ' Set up the File Dialog. Set fDialog = Application.FileDialog(msoFileDialogFilePicker) With fDialog...
  5. June7

    Open file location

    What do you mean by 'only select the file'? You want to open FileDialog with that file highlighted as default in the dialog? Dim fDialog As Office.FileDialog ' Set up the File Dialog. Set fDialog = Application.FileDialog(msoFileDialogFilePicker) With fDialog ' Allow user to...
  6. The_Doc_Man

    Disconnect File Dialog from Access

    ...to locate a file. But if you are using the FSO, you can also look at the fully qualified file spec you found and extract its parts, then supply that information for the next invocation of the FileDialog. I.e. remember the last successful file as the starting point for the next folder to search.
  7. arnelgp

    Solved Selected fields from a table/query to generate Report and export to Excel & PDF in MS Access

    i like Clara's version, clean code. still old (messy code). added SQL view. will show on SQL whether filtered and/or sorted. added image to the buttons. also added FileDialog.
  8. theDBguy

    Save an Access Report to a PDF using the Windows File SaveAs Window

    Have you tried using the FileDialog object? https://docs.microsoft.com/en-us/office/vba/api/Office.FileDialog
  9. MajP

    ...

    OK. I am even more confused. The initialfilename property is the same property of a filedialog regardless of how you configure the filedialog. Configured as a filepicker or saveAs it is still the same property. So why can you not use the initialfilename in the saveas? A simple demo works for...
  10. arnelgp

    Need to change export VBA to let user select folder location

    what is the use of your Filedialog? you already has a custom filename. maybe you want to specify which folder to save the pdf? use msoFileDialogFolderPicker constant. FileName = Me.PatientLastName & ", " & Me.PatientFirstName & " " & Format(Me.PRDateOpened, "m.d.yyyy") & ".pdf" If...
  11. S

    Solved Issue with acDialog on Adding a Record

    ...select a Category, only then can you do everything else. Anyway, to do this import, I've gone down this path: Grab the Excel file using FileDialog and import the data straight into a TEMP table (works great) Clean the data so that it aligns with my tables (works great) Where applicable use...
  12. M

    Open file location

    Exactly Sir, i want the code to only highlight the file , which help to see it between all the files in that folder.
  13. G

    Need to change export VBA to let user select folder location

    I'm still getting a compile error on the "Dim fd As FileDialog" line when debugging. It says "user-defined type not defined" I changed it to "Dim fd As Office.FileDialog" based on your previous suggestion but still same error
  14. Y

    Solved How to copy a file when closing a File Dialog?

    ...for it is when I'm closing the File Dialog. How do I do this? File Dialog entry and exit: Private Sub File_Dialog_Click() Dim fd As FileDialog Dim varFile As Variant Set fDialog = Application.FileDialog(msoFileDialogFilePicker) With fDialog .AllowMultiSelect =...
  15. G

    Microsoft Access cannot find the object 'I1'

    I will have a look at your reference Below is a code I use to transfer a spreadsheet using the file save as popup works fine dont know how to code it to export to pdf though
  16. G

    Need to change export VBA to let user select folder location

    ...want to save it. So like this? Private Sub btnExportEvent_Click() Dim reportName As String Dim criteria As String Dim fd As FileDialog reportName = "CompletedForm" criteria = "[ComplaintNumber]= " & [Forms]![frmDetails]![ComplaintNumber] FileName =...
  17. T

    Disconnect File Dialog from Access

    Hey Doc,What would be the scenario that would make this useful?
  18. theDBguy

    CommonDialog Reference Issue

    Hi. Welcome to AWF! What is CommonDialog used for? If it's to browse for a file path, then you could try using the FileDialog object instead. https://docs.microsoft.com/en-us/office/vba/api/Office.FileDialog
  19. Isaac

    Set correct Drive and Folder when opening Application.Dialogue(xldialoguesaveas).show

    Sub Test() Dim fd As FileDialog Set fd = Application.FileDialog(msoFileDialogSaveAs) With fd .Title = "Provide file name & location" 'for the initial folder, use the part before the last back slash, and they 'will therefore end up inside your specified folder .InitialFileName =...
  20. Sam Summers

    Solved User selection to save a report

    Hi guys, I have taken this code from a previous post of mine but it fails on the second line - Dim fd As FileDialog and comes up with the error message "user defined type not defined". Thought i had this but its got me with my limited abilities. Thank you in advance Dim MyFileName As String...
Back
Top Bottom