Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Tushar's comments are valid. Excel's protection is easily defeated. That said, I believe most protection is easily defeated. You only need go to a crack site (google for crackz) to discover that copy protection is a challenging game and to some people. If you just want to put a "discouraging" lock in place, then Excel and VBA protection will work fine. It won't protect against the determined, that's all. As for the code - in a standard module: Sub Auto_Open() test End Sub Sub test() ... End Sub Suggest you do some reading in Help. A good place to read as follows: From VBA's menu: Help | Microsoft Visual Basic Help Visual Basic Conceptual Topics: Calling Sub and Function Procedures -- Rob van Gelder - http://www.vangelder.co.nz/excel "Tushar Mehta" wrote in message news:MPG.1aa8883b90e74661989720@news-server... 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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Row Height variations from computer to computer on same workbook | Excel Discussion (Misc queries) | |||
Formulaed cell response varies from computer to computer | Excel Discussion (Misc queries) | |||
Display size difference- PC computer vs. Mac computer? | Excel Discussion (Misc queries) | |||
How do I copy all Excel files from old computer to new computer? | Excel Discussion (Misc queries) | |||
Autocomplete works with my home computer but not the office computer | Excel Discussion (Misc queries) |