Results 1 to 9 of 9

Thread: FileDialog Object for Excel 2000?

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    42

    FileDialog Object for Excel 2000?

    Hi,

    I was wondering how do I make the FileDialog Object available for Excel 2000?
    I understand it needs the Microsoft Office II.0 Object library, but to my understandings isn't available for Excel 2000 or earlier. Is there any replacement I can use if FileDialog is not available?
    I understand there is an Application.Dialog object, but how do I access the filename and path from this object?
    Any help would be apprecaited. Thanks!

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: FileDialog Object for Excel 2000?

    You can use the GetOpenFileName and GetSaveAsFileName dialogs from at least Excel 97+. Which dialogs are you in need of?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    42

    Re: FileDialog Object for Excel 2000?

    Hi Rob,

    I need to use the getopenfile object. thanks! I guess I can try to search it through msdn, but meantime can you help me on how to use it? Specifically the properties such as directory and filename. Thanks!

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: FileDialog Object for Excel 2000?

    No problem. I know MSDN can be a pain to search.

    Here is a quick example.

    VB Code:
    1. 'Application.GetSaveAsFilename "InitialFileName", "FileFilter", "FilterIndex", "Title", "ButtonText4MacintoshOnly"
    2.  
    3.     Dim sFileName As String
    4.     sFileName = Application.GetSaveAsFilename("C:\Test.xls", "Excel Workbooks Only (*.xls),*.xls", 1, "My Save As Dialog")
    5.     ActiveWorkbook.SaveAs sFileName '"C:\Test.xls"
    6.     ActiveWorkbook.Saved = True 'Prevents the prompting to save the current workbook since we savedas.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  5. #5

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    42

    [RESOLVED] FileDialog Object for Excel 2000?

    thank you very much! have a nice day

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: FileDialog Object for Excel 2000?

    Thanks for saying Thanks. Dont get too many of those.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7
    New Member
    Join Date
    Apr 2007
    Posts
    1

    Re: FileDialog Object for Excel 2000?

    Hi I am having a similar issue with Excel 2000. But I need to get a folder.

    Thanks

  8. #8
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: FileDialog Object for Excel 2000?

    Use the same but save a file into the required destination. Then strip off the filename part of the filepath and name.

    Instrrev and left functions should do it. Read up on those.

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  9. #9
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: FileDialog Object for Excel 2000?

    Search the forums for BrowseForFolder. Its an API solution but you only need to place it into a Module and then call as a function.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

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



Click Here to Expand Forum to Full Width