Open Workbook Macro - with a twist

N

Neil

Hi All,

I'm looking to open a 'register' workbook, look down a column for the next
available (sequential) index number (first instance of an empty cell in the
target column), send that number (number above the first empty cell +1) into
the workbook from which the macro was called, update the 'register' workbook
by entering the now allocated index number into the previously empty cell,
save the 'register' workbook and close it.

Seems easy, however there is a slight complication.
The 'register' workbook is in a directory that is generally read only to
most users.
I need the macro to pass (write) credentials so that it can open the file,
edit and save, all without the user knowing this is happening
(screenupdating = false).
My IT guys have set up a domain user named 'Macro' that has write access to
the directory in which the 'register' workbook resides.

Can this be dome within an Excel VBA macro, passing of credentials whilst
opening another Excel workbook ?
I'm using Excel 2007 but some of my users will be Excel 2000.

Any ideas ?
Thanks,
Neil
 
J

Joel

What I would recommend is to treat the worksheet like a access database. the
access table and an excel worksheet are basically the same. the reason why
I'm recommending the database solution is access has bettter protection
methods then excel. I would recommend password protecting the workbook.

You can modify the file using ADO methods of access. You can also password
protect the VBA page so users will not be able to see the password used to
modify the worksheet.

Here are some exaples of ADO method

http://www.erlandsendata.no/english/index.php?t=envbadac

The file can be either a MDB file or an XLS file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top