Excel 2000 - Printing different Invoice Numbers

  • Thread starter Thread starter JLanzarote
  • Start date Start date
J

JLanzarote

I have been using the Excel Program for several years (home use) but not
to a 1/10th of its potential.

I want to create an invoice for my business whereby the invoice number
automatically prints in sequencial order every time I ask it to print
and to remember the last number which was printed - if that makes any
sense. The invoice will be a template and not completed "on-screen".

Is this possible?:confused:
 
I think it gets too dangerous to mechanize this a lot. If sheets are lost and
have to be reprinted, you could have more trouble than you want.

I think I'd just "help" a little.

Have it add 1 to the invoice number cell, print the workbook, save it (so you
don't lose your update).

If you like this idea, this is one way of doing it:

Option Explicit
Sub printMe()

Dim myCell As Range

Set myCell = Worksheets("sheet1").Range("a1")

With myCell
If IsNumeric(.Value) Then
.Value = .Value + 1
.Parent.PrintPreview
.Parent.Parent.Save
Else
MsgBox "Non numeric in: " & myCell.Address(0, 0)
End If
End With

End Sub


I'd plop a button from the forms toolbar on the worksheet and assign this macro
to it.

If you didn't want it to print, just rightclick on the button,
select Format Control
Properties tab
and make sure that "print object" is not checked.

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top