View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
msa165 msa165 is offline
external usenet poster
 
Posts: 2
Default Global range name

Thanks for the responses. I don't know if the Access solution will work
because not all of the end users have Access on their system.

I would like to create the range in my add-in if possible, but I didn't know
how to define it using code. Is there a way that I can specify a range just
in code without having to enter the items on a sheet?

Thanks,

"Jim Thomlinson" wrote:

I do something similar but I read my Holiday days into an array out of an
Access Database. The database is easy to change and I have seperate files for
Canada and US holidays. It works pretty well. The database just needs to be
in a common area. If you are Ok with Addins I assume that and ADO DB
recordset is not over your head... Give it a try... I would post mine but the
database has a bunch of other things in it that makes the code appear pretty
convoluted...

HTH

"msa165" wrote:

Is there a way to set a global range name that can used across all of my
spreadsheets? I was thinking I could set a range in an add-in, but once my
file is converted to an add-in, I wasn't sure how to access the worksheet if
I needed to make changes. Basically, what I am looking to do is to have a
range of holidays that I can then reference whenever I am working on Excel.
An example function would be =workday(today(),30,Holidays), where holidays is
the golbal range name. While I can probably set the holidays now going
forward for a while, I would like to be able to view and change them fairly
easily if necessary.