Results 1 to 4 of 4

Thread: Creating a built-in save function in Excel?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    May 2004
    Location
    Right here
    Posts
    275

    Creating a built-in save function in Excel?

    Hi,

    I am developing an Excel app. whose primary function will be for modelling hydraulic (water supply) systems. It already contains a lot of calculations and graphs and so on and is getting quite large (about 8 megs so far).

    The idea is that users will create their models in a 'template' version of the workbook and then save each model under a different filename. The only problem with this is that each model (workbook) is going to be quite large (at least 8 megs).

    I was wanting to create a system whereby users can save just the model-specific information and then save this seperate to the main application. So it would work in the same way as a stand-alone application where the main program can be quite large but the saved files are only small (since they contain only the data relevant to each model rather than all the calculation, graphs and functions and so on).

    Users could then load up the main application and then load/save each model as a seperate (and much smaller) workbook rather than having to save the entire application everytime they create a new model. This is the way I was thinking of doing it:

    When saving:

    1) Have a save button on the primary worksheet of the main application.
    2) When saving, create a new workbook and then copy/paste all the relevant data to the new workbook
    3) Ask user to specify the name of the save file and then save this to disk.

    When loading:

    1) Have a open button on the primary worksheet of the main application.
    2) Bring up an Open dialog box asking user to browse/select which file to open
    3) Have some kind of check to ensure that they are opening the right sort of workbook (a saved model rather than some other workbook).
    4) Open the selected workbook (saved model)
    5) Copy/paste the relevant data from the save file to the main application.

    I have several questions about this approach:

    1) Does it seem feasilble?
    2) Are there any major problems I might encounter if I try to do it this way?
    3) Is there a better option that I just haven't though of?

    Thanks
    -Rob
    Last edited by TheRobster; May 14th, 2005 at 12:49 PM.
    http://www.sudsolutions.com

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

    Re: Creating a built-in save function in Excel?

    Rob, I was wondering why its so large? Are you saving allot of images for the flowchart? If the user saves a wb to a separate file, then it
    need to know that when you reopen it it needs to be opened from your main workbooks instance. If they open it from a standalone
    file, none of your functions would work, unless its all static data?
    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
    Hyperactive Member
    Join Date
    May 2004
    Location
    Right here
    Posts
    275

    Re: Creating a built-in save function in Excel?

    RobDog,

    The app. is so big because there are large amounts of calculations in the actual worksheets, large data ranges, 1000's of lines of VBA code and quite a lot of graphs and a number of images (maps of the UK and so forth). Even if I streamlined the whole application it would still be big.

    The data in the saved file would be static data. Basically the main application relies on the user inputting a relatively small amount of information into certain cells and the application takes care of the actual calculation and analysis part. If I was to just save the user-inputted data the file size would probably be less than 100kb in size, but because at the moment you have to save the entire application, each model comes in at about 8mb in size.

    Opening a saved file as a normal workbook (i.e. not loading it into the main application) would results in a workbook with a few ranges of data that wouldn't actually do anything by itself. The saved files would only make sense if loaded into the actual application.

    It's just how best to do this that I'm trying to determine.

    -Rob
    http://www.sudsolutions.com

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

    Re: Creating a built-in save function in Excel?

    Are your charts Excel charts or static image charts? Dynamic excel charts may help a bit.

    How about creating a custom Save menu - "Save Model Data" which will save the workbook but toa different extension. This will help to
    prevent the user from saving as a Excel Workbook. If they do you can set a booelan to tell if it should hide all sheets upon open if its only
    being opened in Excel and not your master Workbook. Then they wont be able to see the ranges of data and reminds thenm to pen it through
    your main workbook. In your workbook you add the secondary Save Model Data menu item and toolbar button.
    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