Sequential numbering

G

Guest

I’m currently trying to implement sequential numbering for our “homemadeâ€
purchase, order and invoice system.
There are 4 conditions to consider:
1. There are several series of number, i.e. 1 for purchases, 1 for orders,
etc.
2. The number shall be picked when starting the new registration and be
finally confirmed and written at the completion of the registration (I might
cancel during registration)
3. The numbers/file shall be stored on a server volume for shared use by the
workgroup.
4. We oversee the risk of using the same number simultaneously.

A couple of years ago I wrote a fax document system for Word. In Word you have
the function of a System.PrivateProfileString. It works excellently as you
easily can share a textfile with Labels for retrieving and saving different
information, even sections can be used. It’s easily read from and written to.
Unfortunately it doesn’t exist in Excel!

Is it possible to do something similar in Excel.
I’ve read McGimpsey’s solution but it doesn’t tell how to read first and
write later.
I also would like to use several labeled address lines, storing all the
different numbers in one file.
 
L

Leo Heuser

Mats Samson said:
I'm currently trying to implement sequential numbering for our "homemade"
purchase, order and invoice system.
There are 4 conditions to consider:
1. There are several series of number, i.e. 1 for purchases, 1 for orders,
etc.
2. The number shall be picked when starting the new registration and be
finally confirmed and written at the completion of the registration (I
might
cancel during registration)
3. The numbers/file shall be stored on a server volume for shared use by
the
workgroup.
4. We oversee the risk of using the same number simultaneously.

A couple of years ago I wrote a fax document system for Word. In Word you
have
the function of a System.PrivateProfileString. It works excellently as you
easily can share a textfile with Labels for retrieving and saving
different
information, even sections can be used. It's easily read from and written
to.
Unfortunately it doesn't exist in Excel!

Is it possible to do something similar in Excel.
I've read McGimpsey's solution but it doesn't tell how to read first and
write later.
I also would like to use several labeled address lines, storing all the
different numbers in one file.

Mats

You can use automation to get access to PrivateProfileString.
Something along these lines. Remember to set a
reference to the Word library from the VBA-editor.

Sub PPString()
'Leo Heuser, 20 Oct. 2005
Dim WordApp As Word.Application

Set WordApp = New Word.Application

With WordApp
.System. _
PrivateProfileString("C:\Test45.txt", "Test", "Test45") = "680"
.Quit
End With

Set WordApp = Nothing

End Sub
 
G

Guest

Thank you Leo,
it worked fine!
BR
Mats

Leo Heuser said:
Mats

You can use automation to get access to PrivateProfileString.
Something along these lines. Remember to set a
reference to the Word library from the VBA-editor.

Sub PPString()
'Leo Heuser, 20 Oct. 2005
Dim WordApp As Word.Application

Set WordApp = New Word.Application

With WordApp
.System. _
PrivateProfileString("C:\Test45.txt", "Test", "Test45") = "680"
.Quit
End With

Set WordApp = Nothing

End Sub


--
Best regards
Leo Heuser

Followup to newsgroup only please.
 

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