Excel/VBA

Advertisement


Question
Hi. I am new at writing VBA's. I have only learned little about them but I recently got a promotion and I believe I can put it to use now.

I am working on data that will be distributed to about 40 different people. Each person has a district (group of people in a range of cities/states) that they will need to look at. Is there a way I can have a VBA ask for "District", they type in the district and only pulls up data from that district. If this isn't possible I will have to separate each district and send 40 different emails.

Thanks so much!

Tiffany C.

Answer
Sorry. My profile specifically states I can't help with VBA. I do some VBA, but not enough to be helpful with the code.

However, you must be aware that Excel security isn't considered very good, so you maybe should be emailing the different sheets to each. It would actually make smaller emails and increase security.

Ron de Bruin is the "king" of Excel emailing.
http://www.rondebruin.nl/win/section1.htm

And here is the code you could use if you place the email address of each worksheet's recipient in cell A1 of their worksheet:
http://www.rondebruin.nl/win/s1/outlook/amail5.htm

When Ron says--at the end of that article--it will delete the file, he means the SHEET that was separated from your big workbook for sending, not YOUR big workbook.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Anne Troy

Expertise

Virtually all common questions about Microsoft Excel, including all versions. Help with formulas, functions, optimum data layout, and application management. Please: No VBA or macro questions.

Experience

I taught Advanced Microsoft Excel to the senior accountants at the Environmental Protection Agency. Let's hope they were listening.

Publications
Dreamboat on Word Office VBA: Macros You Can Use Today

Education/Credentials
Self-taught and worked with the best in Microsoft Office applications.

Awards and Honors
Microsoft Word MVP 2008

©2016 About.com. All rights reserved.