Big question....


New Member
Jul 23, 2010
Is it possible for a user on a shared excel document to run a macro that would:

1. Examine 2 cells, A1 and B1 for simplicity. The options for A1 are limited to a range named "Names", and the options for B1 are limited to a range named "Workbooks". Both of these ranges are dynamic.
2. Run a search through an array "Names":"Workbooks" if this combination is marked blank. If it is not, stop the process and alert the user someone else is using that combination (the person's name using it will be the contents of the intersection), otherwise continue.
3. Change the cell (in the grid checked in the previous step) to the contents of C1 and insert the time into cell D1
4. Open a new workbook, named from the contents of cell A1
5. Into this new workbook, copy from a different workbook (named from B1), the worksheet named the same as what's in cell A1

So what we have is a user with a new workbook(named from A1) with worksheet with the same name (from A1), copied from workbook B1. The user will be able to edit that worksheet, then when finished run a macro on the original shared document that:

1. Copy the new worksheet back into the original workbook it came from, (B1) replacing the one it had copied in step 5 of above.
2. Delete the new workbook from the user's computer
3. Delete the previous marking in the array of "Names":"Workbook" leaving it blank and enter the time in E1

Essentially what I'm an trying to do is create a way for people to "check out" worksheets from a few different large workbooks. I want to know when that worksheet was "checked out" and when it was "checked out". I also don't want several people checking out the same worksheet at the same time.

Some videos you may like

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Watch MrExcel Video

Forum statistics

Latest member

This Week's Hot Topics