Using VBA to "Update" Spreadsheet

FoRmEd

Board Regular
Joined
Jan 29, 2011
Messages
72
Just want to verify my brainy idea before i start researching what sequence I need to do it in. I don't necessarily need the code... I just need to know if it's "doable," and I will take care of the rest. I will also post the finished code here so those that find this thread while searching can use it.

Ok, so let me run this idea past you. I maintiain an extensive excel spreadsheet, and I release a new version every month. The current process... copy and paste. The future process... an update button on the settings tab.

Is it possible to run a macro that pulls the new version from a predetermined folder, renames it to the same as the old one, copies all the users settings from the settings page and closes, leaving the new version sitting infront of the user? Hence calling it an update button, lol. Or is there a more sensible way to go about it?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
One way would be to Import VBComponents, but a lot depends on the situation.

Mostly, when you update, are you changing just formula cells or are you overwriting cells with data?

It sounds like you have many users and getting the update to them is the issue.
 
Upvote 0
You're quite right, I do have lots of users, and the current complaint is the process of updating their versions. The newer versions contain anything from new modules to userforms or just changing the color of a cell. Basically whatever changes that are requesting. You know the drill, they dont care about the stuff in the background lol.
 
Upvote 0
You could sent them a workbook that has an update button. Pressing the button would either:
Change specific cells in their workbook.
Delete a VBComponent from their workbook (e.g. userform), export the replacement component from the Updating workbook and import it to their workbook.
Copy their data from their workbook to the sheet (with new event code) in Update, delete the original sheet and replace it with the one from Update.

Which it would do would depend on the kind of updating requried.

But a seperate workbook that alters their workbook would probably be the easiest way to preserve their data.
(Be wary of the possibility that they rename worksheets and other customization. Make it clear to the power users that adding VB to their workbook is done at their risk.)

ONE CONCERN- if someone skips an update. You could add a custom document property myVersionNumber to their workbook. The Update workbook that you sent them could have all the updates and apply those after their versionnumber.
 
Upvote 0
Oh I really like your first idea. It reminds me of a patch, altering what is already there.

I know that the renaming bit is difficult, but I was going to get around that by having the version number in the filename.

Im excited to work on this! Where to start... *grabs wrench*
 
Upvote 0
Just a quick update, I'm still working on this. I only get an alotted time per week to work vba, and it's very limited.
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top