Computer Aided Automation
Print some Cells in Excel - VBA Code - Printable Version

+- Computer Aided Automation (https://computeraidedautomation.com)
+-- Forum: CAA Discussions (https://computeraidedautomation.com/forum-7.html)
+--- Forum: VBA Programming (https://computeraidedautomation.com/forum-1.html)
+---- Forum: Excel VBA (https://computeraidedautomation.com/forum-2.html)
+---- Thread: Print some Cells in Excel - VBA Code (/thread-8.html)



Print some Cells in Excel - VBA Code - techberth - 21-11-2019

Sample VBA Code to print some cells (change the cell number in the code)


Sub PrintSomeCells()
Sheets("Costing").Rows("18:71").EntireRow.Hidden = True
Range("D1:H100").PrintPreview
Sheets("Costing").Rows("18:71").EntireRow.Hidden = False
End Sub