Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Seems that when I record a macro that uses 'validated' cells, the only thing
recorded is the selection of the last cell - nothing is recorded showing the values of the cells. I want to reset any selections in the validated cells back to the 'starting point' entries (example: (Select one)). Any ideas? Thanks. Mike |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Will not record validation entries.
http://spreadsheets.about.com/od/adv...xcel_macro.htm "MichaelRobert" wrote: Seems that when I record a macro that uses 'validated' cells, the only thing recorded is the selection of the last cell - nothing is recorded showing the values of the cells. I want to reset any selections in the validated cells back to the 'starting point' entries (example: (Select one)). Any ideas? Thanks. Mike |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The Recorder is no good for this.
Our strategy is to begin by storing the initial value of the "validation" cells in a public, static, array using ValidationTracker. At any future point we can resotre these values using ValidationReset: Public ValidValues(100) As Variant Public rvld As Range Sub ValidationTracker() ' gsnuxx Set rvld = ActiveSheet.UsedRange.SpecialCells(xlCellTypeAllVa lidation) i = 0 For Each r In rvld ValidValues(i) = r.Value i = i + 1 Next End Sub Sub ValidationReset() i = 0 For Each r In rvld r.Value = ValidValues(i) i = i + 1 Next End Sub -- Gary''s Student - gsnu200817 "MichaelRobert" wrote: Seems that when I record a macro that uses 'validated' cells, the only thing recorded is the selection of the last cell - nothing is recorded showing the values of the cells. I want to reset any selections in the validated cells back to the 'starting point' entries (example: (Select one)). Any ideas? Thanks. Mike |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks. Do we need to define 'r','i'? I am getting a compile error 'Sub or
function not defined' at ValidValues(i) = Mike "Gary''s Student" wrote: The Recorder is no good for this. Our strategy is to begin by storing the initial value of the "validation" cells in a public, static, array using ValidationTracker. At any future point we can resotre these values using ValidationReset: Public ValidValues(100) As Variant Public rvld As Range Sub ValidationTracker() ' gsnuxx Set rvld = ActiveSheet.UsedRange.SpecialCells(xlCellTypeAllVa lidation) i = 0 For Each r In rvld ValidValues(i) = r.Value i = i + 1 Next End Sub Sub ValidationReset() i = 0 For Each r In rvld r.Value = ValidValues(i) i = i + 1 Next End Sub -- Gary''s Student - gsnu200817 "MichaelRobert" wrote: Seems that when I record a macro that uses 'validated' cells, the only thing recorded is the selection of the last cell - nothing is recorded showing the values of the cells. I want to reset any selections in the validated cells back to the 'starting point' entries (example: (Select one)). Any ideas? Thanks. Mike |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Btw, I have six Validation tables associated with the cells in question ...
Let's call them ValidAs through ValidFs. Do I need to use variables i through n? Mike "MichaelRobert" wrote: Thanks. Do we need to define 'r','i'? I am getting a compile error 'Sub or function not defined' at ValidValues(i) = Mike "Gary''s Student" wrote: The Recorder is no good for this. Our strategy is to begin by storing the initial value of the "validation" cells in a public, static, array using ValidationTracker. At any future point we can resotre these values using ValidationReset: Public ValidValues(100) As Variant Public rvld As Range Sub ValidationTracker() ' gsnuxx Set rvld = ActiveSheet.UsedRange.SpecialCells(xlCellTypeAllVa lidation) i = 0 For Each r In rvld ValidValues(i) = r.Value i = i + 1 Next End Sub Sub ValidationReset() i = 0 For Each r In rvld r.Value = ValidValues(i) i = i + 1 Next End Sub -- Gary''s Student - gsnu200817 "MichaelRobert" wrote: Seems that when I record a macro that uses 'validated' cells, the only thing recorded is the selection of the last cell - nothing is recorded showing the values of the cells. I want to reset any selections in the validated cells back to the 'starting point' entries (example: (Select one)). Any ideas? Thanks. Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to write a macro that will clear validated cells to blank? | Excel Worksheet Functions | |||
Validated cells and IF statements | Excel Discussion (Misc queries) | |||
how do i colourfill validated cells ? | Excel Discussion (Misc queries) | |||
trying to create an (almost) circular formula between cells and data validated cells with lists | Excel Worksheet Functions | |||
Print Validated Only Macro | Excel Programming |