LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Invoice Numbers - Please Help!

This is all new to me so please be patient! lol

What I'm trying to do is to have automatic advancing invoice numbers in my
template. I'm using Excel 2003. This is what I've tried and just can't get
it to work. Any help would be appreciated. Thank you.

Private Sub Workbook_Open()
Const DEFAULTSTART As Integer = 1000
Const MYAPPLICATION As String = "Excel"
Const MYSECTION As String = "Wardinvoice2"
Const MYKEY As String = "Wardinvoice2Key"
Const MYLOCATION As String = "E5"
Dim regValue As Long

With ThisWorkbook.Sheets(1).Range(MYLOCATION)
If .Text < "" Then Exit Sub
regValue = GetSetting(MYAPPLICATION, MYSECTION, MYKEY,
DEFAULTSTART)
.Value = CStr(regValue)
SaveSetting MYAPPLICATION, MYSECTION, MYKEY, regValue + 1
End With
End Sub

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Invoice Numbers hilltopper_lady Excel Discussion (Misc queries) 3 December 17th 06 06:01 AM
Invoice numbers cdixon Excel Worksheet Functions 1 October 8th 05 01:03 AM
invoice numbers Murphey's Law Excel Discussion (Misc queries) 8 August 5th 05 05:22 PM
Invoice Numbers Russ Excel Discussion (Misc queries) 1 January 29th 05 05:55 PM
Invoice numbers? Missie Excel Worksheet Functions 1 December 13th 04 07:28 AM


All times are GMT +1. The time now is 05:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"