ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Macro Help Needed - Excel 2007 - Print Macro with Auto Sort (https://www.excelbanter.com/excel-worksheet-functions/143117-macro-help-needed-excel-2007-print-macro-auto-sort.html)

Gavin

Macro Help Needed - Excel 2007 - Print Macro with Auto Sort
 
I am a novice and am trying to setup 3 print Macro's in one workbook.
The work book contains 4 sheets, PRODUCTION, INVOICE, ORDER, DELIVERY NOTE.
PRODUCTION is the master sheet. using VLOOKUP I have successfully put all
necessary data on the other 3 sheets. I now want to put 3 different BUTTON
FORM CONTROLS on the PRODUCTION sheet realting to the other 3 sheets. ie
PRINT INVOICE, PRINT ORDER, PRINT DELIVERY NOTE. However I will need the data
being printed to be sorted automatically as I will be hiding the sheets.

The print range on each sheet is the same $B$2:$M$58. The Column to be
sorted automatically before printing is Column C Row8:58. I have started the
macro but have now got my self confused. What I have so far is

Sub PrintInv()
'print invoices'
Dim wsD As Worksheet
Dim wsI As Worksheet
Set wsD = Worksheets("Production")
Set wsI = Worksheets("Invoice")
Dim rStart As Long
Dim rEnd As Long
Dim r As Long


End Sub

I would be greatful for any help!





All times are GMT +1. The time now is 05:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com