Jyotirmaya
Board Regular
- Joined
- Dec 2, 2015
- Messages
- 216
- Office Version
- 2019
- Platform
- Windows
I have 2 sheets "Printout" & "Notice". I want the Printout sheet to Print Automatically after selecting the Value from K1 cell. K1 cell is the dependent list based on Data validation. I want to Print from A1 to I59 Range of Printout sheet. When I select a list in the K1 cell various cell of the Printout sheet changes as I am using Vlookup function in the sheet. the linked data is there in the notice sheet from where the data is linking. I want that when I will select a new value then it will print the Range. As I am using VlookUp & the range of the notice sheet is upto 12000 rows it takes 3 to 4 seconds to populate the values from notice sheet to Printout sheet.
I dont know VB much, a similar code I have found which relates to my question.
What should be the change in the above code ??
I dont know VB much, a similar code I have found which relates to my question.
Sub PrintfromDVList()
Dim ws As Worksheet
Dim i As Long
Set ws = Sheets("Sheet2")
For i = 1 To ws.Cells(Rows.Count, "A").End(xlUp).Row
With Sheets("Sheet1")
.Range("D6").Value = ws.Cells(i, "A").Value
.PrintPreview ' Change to PrintOut after testing
End With
Next i
End Sub
Where Sheet2 is the Data Validation source sheet and the list is in Column A with no headers, and Sheet1 is the sheet to print.
What should be the change in the above code ??