Print all data in drop down list

shootlee

New Member
Joined
Aug 19, 2014
Messages
2
Hello. I really hope someone's going to answer me.

I have 5 worksheets in my workbook. Now my problem is I'd like to print the data in sheet3 contains data of students generated by the drop down list consists of their names in column B12.

The name is taken from sheet2 I think. The names are in column B("B8:B56")

As I did not make the workbook I was just asked to do this 'print all' thing, I'm not very clear of how the drop down list were made. Either using validation data or not.

So can someone please tell me how can I print all students' data without having to click the name one by one?
I've tried some codes found on the Internet but it's not working. I'm sure I did the code wrongly I just don't know how to fix it.

Please please. Thankyou
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Nobody knows this? Please help me:(

I've used these codes.

1.
Sub PrintAll()
Dim c As Range

Application.ScreenUpdating = False
With Sheets("Sijil 1")
For Each c In .Range("A8", .Range("A8").End(xlDown))
.Range("B12").Value = c.Value
.PrintPreview 'PrintOut
Next c
End With
Application.ScreenUpdating = True
End Sub




2.
Option Explicit

Sub Print_List()

Dim c As Range

With Sheet2 'code name for Names sheet
For Each c In .Range("B8:B56")
With Sheet3
.AutoFilterMode = False
.Range("B12").CurrentRegion.AutoFilter field:=1, Criteria1:=c.Value
.PrintOut
End With
Next c
End With

End Sub



Something went wrong but I've no idea what it is. Both codes just print one student data
 
Upvote 0

Forum statistics

Threads
1,217,361
Messages
6,136,103
Members
449,991
Latest member
IslandofBDA

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top