Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
mac,
This should work for you. Make sure the worksheet in question is active before you run it, and change the cell reference "A1" to the appropriate value. Sub Cycle_ValidationValues() Dim rngTarget As Range, rngList As Range, rngR As Range Dim strList As String, strInitialValue As String 'set reference to target cell Set rngTarget = Sheets("Sheet1").Range("A1") 'or whatever 'remeber initial value strInitialValue = rngTarget.Value 'get the source list range strList = rngTarget.Validation.Formula1 'remove the "=" from the start strList = Right(strList, Len(strList) - 1) 'set reference to this list range Set rngList = Range(strList) 'loop through each cell in list range For Each rngR In rngList.Cells rngTarget.Value = rngR.Value ActiveSheet.PrintOut 'print with default settings Next rngR 'reset initial value rngTarget.Value = strInitialValue End Sub Cheers, Dave, "mac" wrote: Hi, I have a excel file that I set up with data validation. When I select the list the data changes. Can anyone help me set up a macro to select each item on list and then print it? Any help will be greatly appreciated. -- thank you mac |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
custom data validation on cells with data validation values | Excel Worksheet Functions | |||
data validation invalid in dynamic validation list | Excel Discussion (Misc queries) | |||
data validation invalid in dynamic validation list | Excel Worksheet Functions | |||
data validation invalid in dynamic validation list | Excel Programming | |||
Data validation with validation lists and combo boxs | Excel Discussion (Misc queries) |