Title: How to drop down box variable printing?
Tags: excel;vba;printing
Question: this is my first post and I am very new to VBA in excel so I was hoping someone could help.
I've crated a spread sheet for the school I work in that generates a student report depending on a drop down box variables and I wanted to be able to print all the thomas68@example.com. there is a good 200 odd of them so I can't really do it one by one.
I have found this code and I think I've got it to work other than the actual printing part of it. I don't know what it means by add some "print page code here"
Can anyone help !?!
Sub Iterate_Through_data_Validation()
Dim dvCell As Range
Dim inputRange As Range
Dim c As Range
'Which cell has data validation
Set dvCell = Worksheets("Sheet1").Range("B1")
'Determine where validation comes from
Set inputRange = Evaluate(dvCell.Validation.Formula1)
For Each c In inputRange
dvCell = c.Value
'add some print page code here
Next c
End Sub


Here is another answer: if your reading this I think I worked it out
This is what I'm using now!
Sub Iterate_Through_data_Validation()
Dim dvCell As Range
Dim inputRange As Range
Dim c As Range
'Which cell has data validation
Set dvCell = Worksheets("Comb Student Report").Range("B4")
'Determine where validation comes from
Set inputRange = Evaluate(dvCell.Validation.Formula1)
For Each c In inputRange
dvCell = c.Value
'add some print page code here
ActiveSheet.PrintOut
Next c
End Sub

{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 0, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2018:00:11/16/18', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<excel><vba><printing>', 'Title': 'How to drop down box variable printing?', 'ViewCount': 58, 'id': 53340286, 'user_AboutMe': None, 'user_AccountId': 14765006.0, 'user_DisplayName': 'Unreal Altz', 'user_Reputation': 1.0, 'user_Views': 1.0, 'user_id': 10663317.0}}