Trying to fix the recent "Scriptlet.TypeLib" problem and tried to follow a solution outlined here: MS Access VBA Error: Run time error '70' Permission Denied in Access but I keep getting a "user-defined type not defined" error.
1 Answer
If you're using the code as posted in the other SO answer, and your compile error is occurring on this line,
Private Declare PtrSafe Function CoCreateGuid Lib "ole32.dll" (Guid As GUID_TYPE) As LongPtr
then it's likely because you're using an older version of Access (and a 6.x version of VBA), that is unaware of the LongPtr keyword. You should be able to just substitute Long for every instance of LongPtr.