Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8302293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T17:15:16+00:00 2026-06-08T17:15:16+00:00

I would like to add SAVE/OPEN functionality to a little Excel program I wrote.

  • 0

I would like to add SAVE/OPEN functionality to a little Excel program I wrote. To use the program, users have to fill in data and adjust settings across several sheets. I would like to save this into a configuration file to be able able to load it later.

How should I build this SAVE/OPEN functionality?

My idea was to group the entered data and configuration on a single sheet (let’s name it Entries) through simple “links” (=Sheet1!A1 for example). This sheet would be exported.

I am saving the entries into a new .xls workbook this way:

ActiveWorkbook.Sheets("Entries").Columns("A:B").copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False 'Paste only values

But the challenge comes when loading the data…

There are several examples on the net (see here and there) that show how to do, but always with the same problem. That is: if I just copy the data from the saved workbook (values only) to the Entries sheet, all my “links” will be erased. Is there a way to synchronize the data?

Or is the only solution to manually enter all the cell values in VBA and doing hundreds of range copies, from the exported workbook directly to the cells used by the user?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T17:15:17+00:00Added an answer on June 8, 2026 at 5:15 pm

    Here is the solution found. Thanks a lot for the help!

    Saving the entries…

    Set CurSheet = ActiveWorkbook.Sheets("Entries")
        maxEntries = 150
        CurSheet.copy 'a new workbook is created
    
        Set wbDest = ActiveWorkbook
        wbDest.Sheets(1).Range("A1:B" & maxEntries).Value = CurSheet.Range("A1:B" & maxEntries).Value
        wbDest.Sheets(1).Range("C1:C" & maxEntries).Value = CurSheet.Range("B1:B" & maxEntries).Formula
    
        For i = 1 To maxEntries
    
            'Removes the leading "=" from the formula
            tempCell = ActiveWorkbook.Sheets(1).Range("C" & i).Formula
            If Len(tempCell) > 1 Then
                wbDest.Sheets(1).Range("C" & i).Value = Right(tempCell, Len(tempCell) - 1)
            End If
    
            'For empty cells
            If wbDest.Sheets(1).Range("B" & i).Value = 0 Then
                wbDest.Sheets(1).Range("B" & i).Value = ""
            End If
    
        Next i
    

    … and loading them.

    fullFileName = Application.GetOpenFilename("Excel files (*.xls),*.xls", _
            1, "Projekt öffnen", , False)
    
        Workbooks.Open fullFileName
        Set wbSaved = ActiveWorkbook      
    
        'Data copy
        maxEntries = 150
    
        For i = 4 To maxEntries
    
            If Not wbSaved.Sheets(1).Range("C" & i) = "" Then 'Skip the empty lines
    
                'Parsing
                c = wbSaved.Sheets(1).Range("C" & i).Value
                l = Len(c)
                p = InStr(1, c, "!", vbTextCompare) 'position of the !, that separates the sheet name from the cell number
                cDestSheet = Mid(c, 1, p - 1)
                cDestCell = Mid(c, p + 1, -(p - l))
    
                'Copy
                wbMain.Sheets(cDestSheet).Range(cDestCell).Value = wbSaved.Sheets(1).Range("B" & i).Value
            End If
        Next i
    
        wbSaved.Close False
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have have completed an application and would like to add a save button
I have own project and i would like add for this class same as
I have a ListView and each item have a TextView. I would like add
I would like to add the ability to save a contact (phone number, name,
I have a form that I use in my CMS that I would like
I would like to save my CSV file as unicode by using Excel. I
I would like to add a GestureDetector to all views (view groups) of an
I would like to add a custom calculation method to a managed object (which
I would like to add roots to a VirtualTreeView http://www.delphi-gems.com/index.php/controls/virtual-treeview with a thread like
I would like to add a hash into an array using Ruby version 1.8.7:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.