creating a purchase order log with repeat vendors - help!!

V

Virginiala

I have a workbook where the first page is a list of all of the purchase
orders written. Each row has specific information in regard to the PO
number, vendor information (name, address, phone) and purchase info.
PO date Vendor phone descripion account
9001 8/17 L&P 323-5555 boxes 855-01
9002 8/17 Neu 555-5555 film 865-23


Each sheet after the top sheet is an actual PO that is printed out and faxed
(or emailed) to the vendor and accountants.

I created a userform to input the PO info, and would like it to do the
following;
PO number - get the last PO number used from the topsheet and +1 (9003)(and
show this on the user form when it opens), and show the date when the form
opens. I tried this:
Private Sub UserForm_Initialize()
txtDATE.Value = "(Date)"
txtPONUMBER.Value = "(call GetPONumber)"
txtvendor.value=''
end sub

Private Sub GetPOnumber()
ActiveWorkbook.Sheets("Top Sheet").Activate
Range("A1").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = x1seriesfill (What next?)


Help!!

Thank you so much!
 
V

Virginiala

For the end: ActiveCell.Value =
"('Topsheet'!Activecell.offset(-1,0).value+1)"
am I on the right track here?
 
J

JulieD

Hi

try

Private Sub UserForm_Initialize()
txtDATE.Value = Format(Now, "mm/dd/yyyy")
txtPONUMBER.Value = Application.WorksheetFunction.Max(Sheets("Top
Sheet").Range("A:A")) + 1
txtvendor.value=''"
end sub

Cheers
JulieD
 

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

Top