Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old October 29th, 2004, 12:26 PM
Registered User
Join Date: Oct 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Need a bit of help with an Excel project

Ok, well at college i have been set the task of making an invoice system that even a noob could use. The invoice system is for a chemist.

At the moment i have my main menu, a button on there links to customer details. Where the input box comes up like on the picture below, i made that come up with macros etc.


What we have been asked to do also if to make it so the customer number is automatically put in each time an 'entry' is put in (so they don't have to put it in). I have no idea how to do this?

Can anyone help?



Old November 1st, 2004, 04:17 AM
Authorized User
Join Date: Aug 2004
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts

Something like this :-
    Dim Database As Worksheet
    Dim LastRow As Long
    Dim CustomerNumber As Long
    Set Database = Worksheets("DataSheet")
    LastRow = Database.Range("A65536").End(xlup).Row
    CustomerNumber = Database.Cells(LastRow, 1).Value + 1
Regards BrianB
Most problems occur from starting at the wrong place.
Use a cup of coffee to make Windows run faster.
It is easy until you know how.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel File closes but project doesn't bdancis Excel VBA 0 November 29th, 2006 04:50 PM
Invoice excel vb6 Project help alireza Excel VBA 1 November 18th, 2006 12:56 PM
64 Bit - Issue in 64 bit IIS calling Win32 API Hubman General .NET 1 August 24th, 2006 09:19 AM
Can't reference to range in excel project 2003 Nashja C# 3 March 8th, 2006 07:24 AM
Copy excel macros to vb project battlebob Excel VBA 2 November 9th, 2004 10:13 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.