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?
Here is the solution found. Thanks a lot for the help!
Saving the entries…
… and loading them.