Userform 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 = show.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 = "('Topsheet'!Activecell.offset(-1,0).value+1)"

am I on the right track here? When the form opens it does not show the
date, and the PO number txt box shows "True" (not the number). What do I do?

Thank you so much!
 

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