Google Answers Logo
View Question
 
Q: need assistance adding vb to excel, whole list of replace and print upon <>0 ( No Answer,   0 Comments )
Question  
Subject: need assistance adding vb to excel, whole list of replace and print upon <>0
Category: Computers > Programming
Asked by: mrtomaso-ga
List Price: $20.00
Posted: 26 Feb 2006 23:29 PST
Expires: 27 Feb 2006 22:14 PST
Question ID: 701385
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
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy