I believe this should be pretty simple, but my VB skills are about 5
years out of date.
here's what I created:
http://www.weddingtowebsite.com/excel/registryscf.xls
It's a program I wrote for work to make our job doable, expecting no reward.
However, i want to take it a step further.
as you can see from the images below, excel spreadsheet is nice
looking and fully function.
We have 110 dispatches to various offices around buffalo, ny. Because
of new security procedures, those sealed bags are handed over to
drivers to take to the correct station.
The first excel page allows us to type in the seal for each station
and it automatically jumps to the correct drivers dispatch sheet.
I'd like to have a final page, as shown in the images below, with a VB
script running. What I need to have happen is pretty simple. If the
seal number in worksheet M <> 0, then I'd like to have four things
happen:
1. the seal number is transfered to worksheet template A9
2. the station name is transfered to worksheet template C6
3. the worksheet template printed off
4. values in template A9 and C6 cleared
I'd like to run through those 4 steps for all 110 stations, which I
know is possible. I just need the ONE station done, so I understand
how to do it. Then, I copy/paste the code over and over.
http://www.weddingtowebsite.com/excel/excel1.jpg
http://www.weddingtowebsite.com/excel/excel2.jpg
http://www.weddingtowebsite.com/excel/excel3.jpg
I think it's going to look something like this:
Range("b4:b111").Select
For Each cell In Range("b4:b111")
cell.Activate
If b <> 0 Then
Sheets("m").Range(b).Value = Sheets("t").Range("a9").Value
Sheets("m").Range(a).Value = Sheets("t").Range("c6").Value
ThisApplication.ActiveWorkbook.Sheets(t).PrintOut
End If
Next cell |