ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Data Validation Behavior (https://www.excelbanter.com/excel-programming/369260-data-validation-behavior.html)

Otto Moehrbach

Data Validation Behavior
 
Excel XP, Win XP
Scenario 1:
Cell A1 is not a Data Validation cell.
Cell C1 is a Data Validation cell, with a list of dates of one month.
Enter a date in A1.
A Worksheet _Change macro fires and enters a date 7 days less than A1
into C1.
The Data Validation in C1 defaults to that date (7 days less than A1).

Scenario 2:
Same scenario except that A1 is a Data Validation cell as well as C1
with the same list.
Select a date in A1.
The Change macro fires.
Nothing is entered into C1.
C1 Data Validation does not default the A1-7
Why?
I know that I can write code to change the list for C1 to start at 7 days
less that A1. But why doesn't the default thing work? Thanks for your
time? Otto




All times are GMT +1. The time now is 10:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com