Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-04-2016, 10:32 AM
blah blah blah blah blah blah is offline VBA - Printing form in excel based on cell value Mac OS X VBA - Printing form in excel based on cell value Office for Mac 2011
Novice
VBA - Printing form in excel based on cell value
 
Join Date: Aug 2016
Posts: 1
blah blah blah is on a distinguished road
Default VBA - Printing form in excel based on cell value

Hello Folks,




I am trying to do something for a organization I do volunteer work and I can not get my head around this one. We use a excel workbook that contains the names of the volunteers that come to work with us and we provide them a listing of their volunteer hours and and task for each month of the year. We have a workbook that we use for this in the following way:
There are 14 sheets in total, where:
  • One sheet has all the volunteer's info (name, address, phone, active volunteer, professional, licensed, task performed etc.). One row per volunteer
  • The volunteer summary sheet that summarizes the 12 sheets of the month for one volunteer at a time. This is the sheet that we print out for them
  • 12 sheets are where we input all the volunteer hours for each month of the year
So on the volunteer summary sheet we change their ID in cell C5 and we get a beautiful sheet with that individuals information for the year
As volunteers come and go our list continues to grow and we keep their info indefinitely. So our list has grown pretty big and we just can not print everyone's info all the time especially those that are no longer active volunteers (Range E2:E501).
Someone provided the following code to me:



Sub PrintAll_IDs()

For Each myCell In Worksheets(2).Range("L2:L501") 'range with stored ID's
Worksheets(5).Range("C5") = myCell.Value ' "C5" is the cell with ID that we change manually now
Worksheets(5).PrintOut
Next myCell
End Sub

This code works but it prints everything even those volunteers that are no longer active and it will not stop till it is done. Range("E2:E501") and Range("N2:N501") in Worksheets(2) (that is the data sheet with all the volunteer info) contains the info I need to filter out those volunteers that no longer need to be printed out. So I am stumbling around trying to see how I get this to work. Any help will be much appreciated. Sorry for what may be a very simple problem but I am really new at VBA. Thanks folks.
Reply With Quote
 

Tags
cell value, print, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA - Printing form in excel based on cell value Need help with using traffic lights in one cell based on date value in a different cell wmedjaxnjr Excel 1 04-09-2016 04:22 PM
Hide a combo box (form control), based on a cell value - Excel 2010 jaymudda Excel Programming 9 07-12-2015 10:59 AM
Can anyone here tweek this macro for renaming Excel files based on a cell's contents? chrisd2000 Excel Programming 6 07-01-2014 01:53 PM
VBA - Printing form in excel based on cell value Excel 2007, highlight entire row based on data found in one cell MSofficeBLUE Excel 2 10-15-2013 09:51 PM
Change formula cell range based on cell value Scoth Excel 4 10-25-2012 07:51 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:22 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft