Hello,
I have Stata 12 installed on my computer (I'll include a picture of the folder at the end of this post). I do not have administrator rights on my computer, but I can have them temporarily added if necessary. I create dozens of do-files, based on the criteria of an Excel spreadsheet. I read this link on STATA automation, but I run into some issues:
Thank you very much for any help. Here is a picture of the folder mentioned:

I have Stata 12 installed on my computer (I'll include a picture of the folder at the end of this post). I do not have administrator rights on my computer, but I can have them temporarily added if necessary. I create dozens of do-files, based on the criteria of an Excel spreadsheet. I read this link on STATA automation, but I run into some issues:
- The article says to load the STATA directory into the cmd prompt, and then type "StataSE /Regserver"
- This command "is not recognized as an internal or external command, operable program, or batch file"
- I assumed I should change the STATASE to Stata-64 (the name of the file on my computer). When I run this command, I don't get an error, but I also don't get any sort of message that suggests it was successful.
- A member of another forum suggested typing regsvr32 DLXAPI32.dll into cmd prompt. When I do that, I get the following erorr:
- The module "DLXAPI32.DLL" was loaded but the entry-point DllRegisterServer was not found. Make sure that "DLXAPI32.DLL" is a valid DLL or OCX file and then try again.
- This same error happens when I type regsvr32 DLXAPI64.dll. These are the only two .dll files in the folder
- The article says to go to tools > add reference - then add COM, in which the STATA plugin is apparently located
- There is no such plugin found in VBA. I can hit "browse", and locate the two DLL files, but both give the following error:
- "Can't add a reference to the specified file."
- There is no such plugin found in VBA. I can hit "browse", and locate the two DLL files, but both give the following error:
- A member on another forum suggested running the following code:
-
Code:
Private Declare Function CeGetDeviceId Lib "C:\Program Files (x86)\Stata12\DLXAPI32.DLL" () As Boolean Sub test() If CeGetDeviceId() = False Then MsgBox "Test" End If End Sub
- When I run the code with 32I get the following error:
- Run-time error '453': Specified DLL function not found
- When I run the code with 64 I get the following error:
- Run-time error '48': Error in loading DLL
-
Thank you very much for any help. Here is a picture of the folder mentioned:

Comment