LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 92
Default Validation OK to named ranges in Veryhidden sheets?


Hi,

I have routines to restore format in cells at worksheet_change events,
and some of them have validation formats. I use this kind of formulas
to restore them:

With rng.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop,
Operator:= _
xlBetween, Formula1:="=OFFSET(OFFSET_YR1_10;REF_MaxNumberYear s;
0;11-REF_MaxNumberYears;1)"


Sometimes I get runtime error 1004, application- or object-defined
error on the
'.Add Type:= ... " line.

ON this particulat code above, the named range 'OFFSET_YR1_10' is on a
veryhidden worksheet and have a list of cells below in column from 1
to 10. 'MaxNumberYears' is a named rage to the same sheet, with value
'9' in the cell. So the offset formula should be ok.



Is there any restrictions with Validation? I know it had to point to
the same sheet, but it work with other sheets if you have nameed
ranges. Is it because it is a veryhidden sheet?

Or maybe validation demand the workbook to be unprotected? Do you know
any restrictions that could create these runtime errors?


Kind regards
Tskogstrom

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Validation list from Named Ranges Mik Excel Worksheet Functions 5 July 30th 09 10:32 PM
Named Ranges Not Working in Data Validation dplum Excel Worksheet Functions 8 November 24th 07 01:32 PM
How do I use Named Ranges as Data Validation Lists? Chris Mitchell Excel Worksheet Functions 2 June 23rd 07 12:15 PM
Named ranges on other sheets Conan Kelly Excel Programming 3 September 12th 06 08:44 PM
Validation protection with named ranges Ben H Excel Worksheet Functions 1 March 17th 06 03:49 AM


All times are GMT +1. The time now is 04:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"