Thread
:
Unique ID/Name for a computer?
View Single Post
#
8
Posted to microsoft.public.excel.programming
Tushar Mehta
external usenet poster
Posts: 1,071
Unique ID/Name for a computer?
To answer your specific question, put Rob's code in a standard module.
To execute a subroutine named Test from some other code, use the
statement
Test
Books on VBA? I'd say a trip to the local library or book store is
called for. Browse through the selection and pick something that makes
sense to you.
Finally, XL is not designed for the development of secure solutions.
Any scheme you develop will be almost trivial to defeat. But, it's
your decision...
--
Regards,
Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
In article ,
says...
Thanks for your reply Tushar.
I am trying to learn VBA but in the very short-term I have this tool that is being used by quite a few insurance agents who have encouraged me to sell it. I think the market for this tool is rather small - not expecting to make a lot of $$ - more like a challenge.
My question regarding Rob van Gelder's code is this: I'm not sure how to place the code. At this point, the extent of my VBA experience is AUTO_OPEN and AUTO_CLOSE. I would like to call his code from AUTO_OPEN, but do I create a standard module or class modue. What is your suggestions for laying this out?
Do you have any suggested VBA reading for beginners that is easy to read.
Thanks
-WarrenR
----- Tushar Mehta wrote: -----
Ummm...
You have some very elaborate plans for protecting your product, but if
you are just learning VBA what are you protecting? Wouldn't you be
better off learning VBA first and then worrying about how to protect
your work? Of course, you know your application better than I do,
so...
--
Regards,
Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
In article ,
says...
How do I call another macro (with your code) from my AUTO_OPEN macro? (I am just learning VBA)
Thanks again in advance,
-Warren
----- Rob van Gelder wrote: -----
Lots of application protection schemes use a combination of hardware
identifiers (MAC address, Vol Serial etc...)
Here's some code to pull C: Volume Serial Number
Declare Function GetVolumeInformation Lib "kernel32" Alias
"GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal
lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long,
lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long,
lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal
nFileSystemNameSize As Long) As Long
Sub test()
Const cMaxPath = 256, cDrive = "C:\"
Dim strTemp As String, lngRet As Long
Dim lngVolSerial As Long, strVolName As String * cMaxPath
Dim lngMaxCompLen As Long, lngFileSysFlags As Long
Dim strFileSysName As String * cMaxPath
lngRet = GetVolumeInformation(cDrive, strVolName, cMaxPath, lngTemp, _
lngMaxCompLen, lngFileSysFlags, strFileSysName, cMaxPath)
strTemp = Format(Hex(lngTemp), "00000000")
strTemp = Left(strTemp, 4) & "-" & Right(strTemp, 4)
MsgBox strTemp
End Sub
--
Rob van Gelder -
http://www.vangelder.co.nz/excel
"Warren" wrote in message
...
All,
1) Is there a way to identify a PC that excel is running on? I.e., IP
address maybe?.
2) If there is, can I use VBA to somehow grab the id/name?
3) If so, what would the code look like?
Thanks in Advance, -Warren
Reply With Quote
Tushar Mehta
View Public Profile
Find all posts by Tushar Mehta