Program a macro to print

I have an employee expense report that contains employee information in the 
first five rows.  The rows 6 through 30 are blank and for the employee to 
fill in (or add additional rows if necessary) with a list of their expenses.  

In rows 31 - 37, there is information that the employee acknowledges that 
the expenses listed in the rows are true and incurred on behalf of his/her 
job duties.  

I have a macro that automatically prints this worksheet.  If the employee 
doesn't have enough expenses to fill all the rows between 6 and 30, I would 
like to create a routine in my macro to look for the first blank in row A and 
delete the blank rows until the macro finds a text entry in row B - which, if 
all rows 6 through 30 have been used,  cell 32B begins the text that follows 
the expenses that the employee must sign verifying that expenses listed above 
are correct and incurred on behalf of his/her job.  

Thanks for your help!  


0
Utf
4/1/2010 8:39:01 PM
excel.programming 6508 articles. 2 followers. Follow

1 Replies
826 Views

Similar Articles

[PageSpeed] 52

      If desired, send your file to my address below. I will only look if:
      1. You send a copy of this message on an inserted sheet
      2. You give me the newsgroup and the subject line
      3. You send a clear explanation of what you want
      4. You send before/after examples and expected results.


-- 
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett@gmail.com
"stevestr" <stevestr@discussions.microsoft.com> wrote in message 
news:9363F33B-4927-428E-B89F-337C20B38270@microsoft.com...
>I have an employee expense report that contains employee information in the
> first five rows.  The rows 6 through 30 are blank and for the employee to
> fill in (or add additional rows if necessary) with a list of their 
> expenses.
>
> In rows 31 - 37, there is information that the employee acknowledges that
> the expenses listed in the rows are true and incurred on behalf of his/her
> job duties.
>
> I have a macro that automatically prints this worksheet.  If the employee
> doesn't have enough expenses to fill all the rows between 6 and 30, I 
> would
> like to create a routine in my macro to look for the first blank in row A 
> and
> delete the blank rows until the macro finds a text entry in row B - which, 
> if
> all rows 6 through 30 have been used,  cell 32B begins the text that 
> follows
> the expenses that the employee must sign verifying that expenses listed 
> above
> are correct and incurred on behalf of his/her job.
>
> Thanks for your help!
>
> 

0
Don
4/1/2010 9:28:33 PM
Reply:

Similar Artilces:

Can't reply, forward, or print some emails in sent folder
In Outlook 2002, I can't reply or forward some emails in the sent folder. The toolbar and file menu stay gray on a large number of emails and I can not select any action. However on emails sent just a minute before, I can reply, forward, or print them. What could be causing this? ...

Communications Between Program and Controlling Program
Hi All, I'm looking for feedback on the best way to code communications between Programs. The architecture we are looking at is similar to Symantec AV or others - a control program sends messages to the worker program on a different machine. The worker program communicates back when complete (with a result), and gets another chunk of work. The messages will be small. What will be communicated is as follows: Control Program: Control Program Start Control Program Stop (Worker queues messages) Control Program sends a piece of work when requested Worker Program: Worker Program Start Worke...

borderless printing with publisher
I am trying to print borderless 8.5" x 11" sheets from publisher to an HP 7660 printer, which can print borderless. It doesn't seem to be working, was wondering if publisher is able to print borderless 8.5" x 11" sheets on their own. thanks, fiona Do you have your printer settings set for full bleed? -- JoAnn Paules MVP Microsoft [Publisher] "fiona" <anonymous@discussions.microsoft.com> wrote in message news:2190501c45aed$f009a750$a101280a@phx.gbl... >I am trying to print borderless 8.5" x 11" sheets from > publisher to an HP ...

001 showing on background of document when printed
When I print out a sheet from XL it comes with a 001 printed diagonally across the page. This 001 can not be seen in print preview or anywhere else until I print it out and than it is printed across my page. Now interestingly enough if I go into File menu/print page/properties/overlay/ and change the watermark setting from <None> to confidential it removes the 001 and places the confidential in the center of my page. Why in the world does doing this remove the 001 and how can I make so the None really means none. Can anyone help me? Thanks Might be a printer setting. Che...

Help with assigning a macro to a commandbutton
I need to assign a macro to a commandbutton. I've recorded the macro and tried the code below but I get a "Expected End Sub" error Private Sub CommandButton1_Click() Sub Openproductmix351() ' ' Openproductmix351 Macro ' Macro recorded 8/30/2003 ' ' Sheets("PRODUCT MIX 351").Visible = True Sheets("351").Visible = True End Sub End Sub What did I do wrong? TIA, David I think it should be:- Sub Openproductmix351() 'Openproductmix351 Macro ' Macro recorded 8/30/2003 Sheets("PRODUCT MIX 351").Visible = True Sheets...

Running another program
Is it possible to run another program from within excel? The software I use at work is very repetitive and requires the same key-sequences entered many times. I got a key logger to help automate this so now I just press one key and the key logger will play back the sequence I recorded. I now want to be able to call the key logger from excel with a parameter to automate things further. Excel has its own macro recorder. Why not use it? "Stephen Miller" <StephenMiller@discussions.microsoft.com> wrote in message news:669A213C-F604-424D-A640-D90BEEDB83BC@mic...

Macro to edit details
Hi, i am currently trying to create a macro regarding editing staf details on a worksheet....... therefore i recorded a macro and named it editstafflist, i highlighte my headings...and then went to 'data > form' and then had to close th form and then stop my macro. It wouldnt allow me to stop my macr whilst the dialogue box was open. Anyways after stopping the macro drew out a button and assigned this 'editstafflist' macro to it. saved my sheet and then clicked on the button, but a error '1004' kep occuring, can anyone please help me on this as i am rather stuck ...

Cannot Copy/Paste to some programs
I am using XP Home Edition and Word 2003 and Firefox browser. I find that, even though I can copy/pate between word.docs I cannot copy/paste to a Moonfruit website that I am building. I am in touch with moonfruit and it has them baffled. They are able to copy/paste to my website with no problem. I also find I cannot copy/Paste URLs from Firefox to IE browser. Any ideas? Thanks On 5 June, 15:45, Merryterry <ter...@fsmail.net> wrote: > I am using XP Home Edition and Word 2003 and Firefox browser. > > I find that, even though I can copy/pate between word.docs I ...

macro #6
Hi how can I convert a field that has an ' before the number, for example '4578 i would like to convert it to 4578 Greg Hi Greg, For a VBA solution, try: '=============>> Public Sub DeleteApostrophes() Dim WB As Workbook Dim SH As Worksheet Dim rCell As Range Set WB = Workbooks("YourBook.xls") '<<===== CHANGE Set SH = WB.Sheets("Sheet1") '<<===== CHANGE Set rng = SH.Range("A1:A20") '<<===== CHANGE For Each rCell In rng If rCell.PrefixCharacter = "'" ...

Macro to delete
Hi, I've never used Macros in Excel before and need to start now. Basically every so often I receive a list of patients from GP practices in Excel documents. The list is dumped in from GP systems and often needs sorting. The main problem with the lists is that there are often several empty rows between each patient. We use these lists for mail merge purposes and the blank rows cause havoc. I would like to create a macro that will search through the patients and delete the empty rows. I tried using the code from one of the other threads. It did what I wanted but I could not sto...

print envelope labels
I tried my first marketing campaign to send out a mailing. I was able to carry through a merge for a letter but couldn’t find where to print envelope labels. I ended up pulling up the marketing list in advanced find and printed the labels through there. Is there a quicker way? ...

Dashboard Reporting
Hi, I recently tried to create a 'dashboard' style report by using the camera tool to take pictures of my graphs on different worksheets, and presenting them together on the first worksheet. You can see samples of this type of report at www.exceluser.com Everything looks good until I try to print preview, at which point graphic elements on the chart, and the plot area, totally resize. This makes the chart unreadable. Both the camera picture of the chart (on sheet 1) and the original chart (on sheet 3) are affected. Does anybody know why this happens, or how to prevent it happenin...

From Outlook 2010 to another program
Following a reply from Microsoft ("we know about your problem, we are working on it but currently we don't have a solution") I need to start using a different program until the problem is solved. O.S. is Seven, which is the best way to move all mails/accounts/contacts to something different? I read that Windows Live Mail doesn't import messages so I need to move to something out of Microsoft... -- /-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\ -=- -=- -=- -=- -=- -=- -=- -=- - -=- >>>>> http://www.bb2002.it :) <<<<< ............ [ al lavoro ] ......

how do I set a default font and size for printing envelopes?
I use a font in my reports and the printer goes to a different font for envelopes. I would like to set the printer font to be the same as the document font all the time. Envelope formatting is determined by the Envelope Address and Envelope Return paragraph styles. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA http://word.mvps.org "ecphd" <ecphd@discussions.microsoft.com> wrote in message news:74BF1638-1C0F-446E-9E0E-79D9906C9577@microsoft.com... >I use a font in my reports and the printer goes to a different font fo...

Cannot run the macro 'XXX'
I am developing an Excel 2007 add-in compromising of an Excel Add-In (.xla file) and a COM Add-In (managed code written in C# in Visual Studio Tools For Office). In the start-up function of the COM Add-In I need to call a macro on the .xla file. In the installer application for the add-in I am changing the registry keys in Excel Security so that: - The Trust access to VBA project object model check box is ticked; - All macros are enabled. On a large proportion of computers that I test the add-in on, everything works fine. However there are a few computers which (when attempti...

Recording new Macro won't reset drop downs
The title pretty much says it all. I am creating a "Clear Sheet" macro. When recording the macro I am clearing all data from necessary fields. However, I have a drop down with 5 account code numbers and one blank spot. When I am recording the macro I reset manually the drop down arrow to the blank choice. When I complete recording and run the "Clear Sheet" macro it clears everything out fine, but does not change the drop down to the blank spot. Can anyone tell me what I am doing wrong, or perhaps a better way of getting around this problem. Thanks in ...

Unnecessary messages from the outlook program + ...
Hi there... When I've pressed "send and recieve" and waited... there are two messages from the program which I think should not be necessary and could be dispensed with possibly ?? Message 1. says, new mail has arrived would you like to read it now. Message 2. says, it has been moved. we know that the email messages that it's refering to are spam and have duly been put into the norton antispam folder... so why are these messages necessary and how do we configure to get rid of them. when I press "send and recieve" at the beginning I would like to see and read em...

Excel merged cells Not printing #2
Dave, Thanks for the suggestion. I am going to test it out with her and se if that makes a difference! I will let you know. Thanks again, Meliss -- Tuttama ----------------------------------------------------------------------- Tuttamay's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1540 View this thread: http://www.excelforum.com/showthread.php?threadid=27016 ...

How to Print Header Attachment Info
When I try to print an open email which contains an attachment in the header attachments, the attacment file name doesn't appear in the printed copy. Is there a way for Outlook to include the header attachments with the file name in the printed copy? For example an email header would look like the following: From:TEST@TEST.COM To:Joe.Smith@TEST.COM CC: Subject:TEST Attachments:TEST.PDF The informtation I would like included in my printed copy is the header details - Attachments:TEST.PDF. Please let me know if you have a solution. Thanks, Nigel Marsh Version of Outlook? For O...

Fatloss computer program
I have been using this computer program for a couple weeks now and i am very pleased with the results so far. its a software fatloss program, if your looking for a diet/weightloss plan i reccomend you check this place out first: http://fatloss9.50webs.com ...

Word 2007 menu option missing from start programs menu
Office 2007 is installed on my computer and can only be accessed by going to the Recent Documents option and opening an existing doc. The menu selection for the program is missing from the MS Office option in the Start/All Programs menu. All other Office programs are listed. How do I get the Office 2007 program option to appear in the program menu again? ...

Macro to copy and paste all rows of data in between two words
Dear Group This is probably somewhere here on this site but I cannot seem to track it down so I hope someone can help me. I am looking for a macro that can find the word "Start" in column B and then move one row and select all the rows until the word "End" is found in Column B". Then copy from sheet named "Datafrom" to sheet named "Datato". I really hope someone can help with this. Thanks very much in advance. Try; Sub DoIt() Dim rRange As Range On Error Resume Next Set rRange = Range(Range("A:A").Find("...

multiple text boxes when pasting in text from other programs
When copying and pasting text from Outlook Express or other programs into a newly created text box, each paragraph is going into its own separate text box within the original text box. This did not happen in Publisher 2000. Is there a way to 'turn off' this automatic text box creation and allow an entire article to go in as pasted? Miss Mood wrote: > When copying and pasting text from Outlook Express or other programs > into a newly created text box, each paragraph is going into its own > separate text box within the original text box. This did not happen > in Publi...

Unable to run any programs
I have a serious problem on my PC and wondered if anyone had any ideas. I re-booted my PC and after it came back up there were no icons in the system tray. When I tried to run any program from my task bar or desktop the system displayed the window which asks which program you would like to use to open the file (even though the files are all exe). I can open Word, Excel, PPT by double clicking on a relevant file(.doc .ppt .xls). however I can't open Outlook by clicking on a .pst file. I also can't run things from the 'run" window (like regedit, ipconfig etc). Als...

Outlook Printing cutting off margins of emails.
This is weird and I've tried everything short of reinstalling outlook. Out of the blue last week, a users outlook started printing too wide and cutting off text on the left margin. This only occurs on her local printer, not on any of the networked printers. I have gone through and changed drivers, and reset defaults and anythign else I can think of but no results. Any Ideas or pointers would be apreciated. Thanks Was IE 7 recently installed? There are issues with IE7 and printing in outlook. "Docwatmo" <nospammy.dwatson@linncountyrec.com> wrote in message ne...