Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
code for auto numbering documents
hi,
can someone please help. i have the following code for saving the same template with cosecutive document numbers on our network. a drive "Z" was created where every document is saved, but what happens is that 4 computers are used for quoting by different people and it seems as if every computer generates its own range of numbers, starting at one off course. so it now happens that the are 2 quotes with number 40177. is there a way of correcting this? the code is: Sub SvMe() Dim newFile As String, fName As String fName = Range("K2") & "=" & Range("G11") & "," & Range("G12") & "=" & Range("G9") & "=" & Range("B8") & "," & Range("B9").Value newFile = fName & " " & Format$(Date, "dd-mm-yy") ' Change directory to suit your PC, including USER NAME Dim Filename As Variant ChDrive "Z" ChDir "Z:\" ActiveWorkbook.SaveAs Filename:=newFile If TypeName(Filename) < "Boolean" Then MsgBox Filename End If End Sub |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
code for auto numbering documents
Maybe using a text file to keep track of the numbers would be ok:
http://www.mcgimpsey.com/excel/udfs/sequentialnums.html Look for: "Using a text file to hold sequential numbers" des-sa wrote: hi, can someone please help. i have the following code for saving the same template with cosecutive document numbers on our network. a drive "Z" was created where every document is saved, but what happens is that 4 computers are used for quoting by different people and it seems as if every computer generates its own range of numbers, starting at one off course. so it now happens that the are 2 quotes with number 40177. is there a way of correcting this? the code is: Sub SvMe() Dim newFile As String, fName As String fName = Range("K2") & "=" & Range("G11") & "," & Range("G12") & "=" & Range("G9") & "=" & Range("B8") & "," & Range("B9").Value newFile = fName & " " & Format$(Date, "dd-mm-yy") ' Change directory to suit your PC, including USER NAME Dim Filename As Variant ChDrive "Z" ChDir "Z:\" ActiveWorkbook.SaveAs Filename:=newFile If TypeName(Filename) < "Boolean" Then MsgBox Filename End If End Sub -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto Numbering | Excel Discussion (Misc queries) | |||
Auto Numbering | Excel Worksheet Functions | |||
How to link diffrent documents with a sequence of page numbering? | Excel Discussion (Misc queries) | |||
sequence of page numbering from diffrent documents in to a footer | Excel Discussion (Misc queries) | |||
auto numbering | Excel Discussion (Misc queries) |