В приложениях Visual Basic for Application в Microsoft Office 2010 может возникнуть следующая ошибка:
Compile error:
The code in this project must be updated for use on 64-bit systems.
Please review and update Declare statements and then mark them with the PtrSafe attribute.
Проблема известная, описана в базе знаний Microsoft как KB983043. Решается добавлением слова PtrSafe после слова Declare. Для примера на рисунке было:
Private Declare Function URLDownloadToFile...
стало
Private Declare PtrSafe Function URLDownloadToFile...
Но согласно заметке http://msdn.microsoft.com/en-us/library/gg251723.aspx:
Adding the PtrSafe keyword to a Declare statement only signifies the Declare statement explicitly targets 64-bits, all data types within the statement that need to store 64-bits (including return values and parameters) must still be modified to hold 64-bit quantities using either LongLong for 64-bit integrals or LongPtr for pointers and handles.
потребуется изменение типов: LongLong для хранения любых целых чисел (но в 64-битовом представлении), и LongPtr для указателей и дескрипторов. Теперь заголовок функции выглядит так:
Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" ( _ ByVal pCaller As LongLong, _ ByVal szURL As String, _ ByVal szFileName As String, _ ByVal dwReserved As LongLong, _ ByVal lpfnCB As LongLong) As LongLong
Чтобы избежать переделки кода на различных системах, правильно будет написать:
#If Win64 Then Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" ( _ ByVal pCaller As LongLong, _ ByVal szURL As String, _ ByVal szFileName As String, _ ByVal dwReserved As LongLong, _ ByVal lpfnCB As LongLong) As LongLong #Else Private Declare PtrSafe Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" ( _ ByVal pCaller As Long, _ ByVal szURL As String, _ ByVal szFileName As String, _ ByVal dwReserved As Long, _ ByVal lpfnCB As Long) As Long #End If
Рекомендую также прочитать http://msdn.microsoft.com/en-us/library/ee691831.aspx.
- Remove From My Forums
-
Question
-
Hello
I’v a problem:
Compile error: The code in this project must be updated for use on 64-bit systems
after add PtrSafe this problem disapear but shows another: run time error 13
in this code:
Do While Cells(L, «CT»).Value <> «»
when I change «CT» to the number of column, problem doesn’t disapear…
when I change «CT» to the number of column there is no data everything goes ok but macro no copy data:)
Function in the column CT looks like this:
=JEŻELI(WARTOŚĆ(PRAWY(KOMÓRKA(«nome.arquivo»;W[-8]K[-97]);DŁ(KOMÓRKA(«nome.arquivo»;W[-8]K[-97]))-SZUKAJ.TEKST(«]»;KOMÓRKA(«nome.arquivo»;W[-8]K[-97]))))=1;1;1+ADR.POŚR(ADRES(329;NR.KOLUMNY();;;WARTOŚĆ(PRAWY(KOMÓRKA(«nome.arquivo»;W[-8]K[-97]);DŁ(KOMÓRKA(«nome.arquivo»;W[-8]K[-97]))-SZUKAJ.TEKST(«]»;KOMÓRKA(«nome.arquivo»;W[-8]K[-97]))))-1)))
And now the best.
File is from Brazil, it is work perfect on German office 2013 Pro Plus,
it doesn’t work on Poland office 2013
what to do???
-
Moved by
Friday, June 10, 2016 6:35 AM
VBA related issue -
Edited by
Cyprian83
Friday, June 10, 2016 3:10 PM
-
Moved by
- Remove From My Forums
-
Question
-
Hello.
Whenever I open Excel, an errorbox titled «Microsoft Visual Basic for Applications» pops up.
it says:
Compile error in hidden module: MPrecedentAnalyzer. This error commonly occurs when code is incompatible with the version, platform or architecture of this application. Click «Help» for information on how to correct this error.
Would anyone know how to fix this?
Thanks,
Answers
-
Hi,
First, try the following method:
If in Windows XP open the following folder:
C:Documents and SettingsUSERNAMEApplication DataMicrosoftForms where
USERNAME is the current userIf in Windows 7 open the following folder:
C:UsersUSERNAMEAppDataRoamingMicrosoftForms where
USERNAME is the current userOnce the folder is located, delete these 2 files
ComctlLib.exd
MSComctlLib.exdIf the above method doesn’t work, then try the following:
Start Excel in safe mode to check the issue. If the issue doesn’t occur in safe mode, then it means that the issue caused by some add-ins such as PDF and so on.
Jaynet Zhang
TechNet Community Support-
Marked as answer by
Monday, December 24, 2012 9:14 AM
-
Marked as answer by
Ошибка решается, проверкой не включенных модулей в окне VB,проверьте все ли необходимые модули включены,и есть ли эти модули на самом деле на ПК,возможно модуль отмечен,но сам отсутствует у меня проблему решило,включением специфических модулей для конкретного файла с расчетами.
Решение проблемы: Откройте файл в Excel – при помощи комбинации клавиш войдите в окно Visual Basic(ALT+F11), далее выберите меню “Tools-References” и посмотрите все ли отмеченные модули есть на самом деле на компьютере и все ли модули необходимые для работы Вашего макроса включены.
Error in Excel “Compile Error in Hidden Module”
Can be happen when Excel miss some reference to library.
For fix: Open Excel – Go to VB window -(ALT+F11).Open Tools-References and check unchecked modules(only needed for your Document).
Return to VBA Code Examples
This tutorial will explain what a VBA Compile Error means and how it occurs.
Before running your code, the VBA Editor compiles the code. This basically means that VBA examines your code to make sure that all the requirements are there to run it correctly – it will check that all the variables are declared (if you use Option Explicit which you should!), check that all the procedures are declared, check the loops and if statements etc. By compiling the code, VBA helps to minimize any runtime errors occurring.
(See our Error Handling Guide for more information about VBA Errors)
Undeclared Variables
If you do not declare variables, but your Option Explicit is switched on at the top of your module, and then you run the macro, a compile error will occur.
If you click OK, the relevant procedure will go into debug mode.
Alternatively, before you run your code, you can force a compilation of the code.
In the Menu, select Debug > Compile Project.
The compiler will find any compile errors and highlight the first one it finds accordingly.
Undeclared Procedures
If you code refers to a procedure that does not exist, you will also get a compile error.
For example:
Sub CallProcedure()
'some code here then
Call NextProcedure
End Sub
However, if the procedure – NextProcedure does not exist, then a compile error will occur.
Incorrect Coding – Expected End of Statement
If you create a loop using For..Each..Next or With..End With and forget to and the Next or the End With… you will also get a compile error.
Sub CompileError()
Dim wb As Workbook
Dim ws As Worksheet
For Each ws In wb
MsgBox ws.Name
End Sub
The same will happen with an If statement if the End If is omitted!
Missing References
If you are using an Object Library that is not part of Excel, but you are using the objects from the library in your variable declaration, you will also receive a compile error.
This can be solved by either Late Binding – declaring the variables are Objects; or by adding the relevant Object Library to the Project.
In the Menu, select Tools > References and add the relevant object library to your project.
VBA Coding Made Easy
Stop searching for VBA code online. Learn more about AutoMacro — A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users!
Learn More!
You may receive an error when you try to run, edit a macro, or compile Microsoft Visual Basic Application (VBA) code.
Microsoft Visual Basic For Applications
Compile Error:
The code in this project must be updated for use on 64-bit systems. Please review and update the Declare statements and then mark them with the PtrSafe attribute.
You can choose to ignore the “Compile Error” and click Ok. You can still run the VBA macro in the 64-bit version of Office 2010.
To fix the error from re-appearing, add PtrSafe to the first line of your function. Finally, refer to the compatibility between the 32-bit and 64-bit versions of Office 2010 here.
* Please use the comment form below. Comments are moderated.*
While working on the Microsoft Excel document it is likely to encounter a Compile error can’t find project or library Excel. Thus, if you are one such user, who is also facing the same error when using VBA for the Macros, keep on reading this post.
In this comprehensive post, you are going to learn how to fix Compile error in Excel macro using both manual as well as automatic solutions.
Quick Solutions |
Step-By-Step Solutions Guide |
Way 1- Look for Missing Reference |
Open Excel document >> press ALT and F11 keys on your keyboard…Complete Steps |
Way 2- Registering the Library File |
Go to the “Start” menu >> type “CMD” >> click on “Command Prompt (Admin)”…Complete Steps |
Way 3- Disable Missing Type Or Object Library Option |
Press the ALT and F11 keys on your keyboard to switch to the Visual Basic Editor…Complete Steps |
Way 4- Unregister & Reregister a Library |
Press the “Windows + R” keys >> type Regsvr32.exe…Complete Steps |
To repair corrupted Excel file data, we recommend this tool:
This software will prevent Excel workbook data such as BI data, financial reports & other analytical information from corruption and data loss. With this software you can rebuild corrupt Excel files and restore every single visual representation & dataset to its original, intact state in 3 easy steps:
- Download Excel File Repair Tool rated Excellent by Softpedia, Softonic & CNET.
- Select the corrupt Excel file (XLS, XLSX) & click Repair to initiate the repair process.
- Preview the repaired files and click Save File to save the files at desired location.
What Does Excel Can’t Find Project or Library Error Mean?
When Compile error: can’t find project or library occurs then it simply means that you can’t perform any operation in your Excel document that needs VBA. Below you can see the real interface of this Compile error:
In simple words, we can say, this error is faced by the users while using the VBA (Visual Basic Applications) for the macros to perform some assigned tasks.
To fix Excel Can’t Find Project or Library error you have to search for the missing Excel VBA References and after that uncheck Excel references.
Way 1- Look for Missing Reference
The very first method that you should try to fix this error in Excel is to look for missing references.
Here are the complete steps to do this:
- Open your Excel application and then press ALT and F11 keys on your keyboard.
- On the opened VBA window go to the tools >> References dialog box.
- Choose the missing reference and then start your Object Browser.
- Use the Browse dialog box to make search for your missing reference.
- Hit the OK.
- Repeat the preceding steps until all missing references are resolved.
Also Read: [6 Fixes] Cannot Edit A Macro On A Hidden Workbook
Way 2- Registering the Library File
Installing any new software on your PC sometimes de-registers some specific libraries. In that case, registering the library file manually can help you to fix can’t find project or library VBA.
To do this, follow the below steps:
- On your Windows PC, go to the “Start” menu.
- Type “CMD” >> click on “Command Prompt (Admin)”.
- After this, click on “Run as Administrator”.
- Once a CMD window opens on your screen, you have to type the REGSVR32 “Path of a DLL File which you need to register”. (E.g.- REGSVR32 “C:Program FilesBlackbaudThe Raisers Edge 7DLLRE7Outlook.dll”).
Doing this will help you to register the chosen library file without any error.
Way 3- Disable Missing Type Or Object Library Option
Commonly, the application has lost the reference to an object or type library resulting in the above error while using barcode macro and native VBA Functions.
To fix the Macros Compile error, follow the steps:
- Open the Microsoft Excel file that is giving you the error message.
- Make sure the Excel sheet or Datasheet that has the buttons or functions in question is selected.
- Simultaneously press the ALT and F11 keys on your keyboard to switch to the Visual Basic Editor in a new window (as seen below).
- In the new Visual Basic Editor window, click on the Tools menu at the top of the screen, and then click.
- A References dialogue box will display on the screen. A missing type or object library is indicated by “MISSING:” followed by the name of the missing type or object library (an example is MISSING: Microsoft Excel 10.0 Object Library, as seen below).
- If there is a checkmark in the checkbox next to the missing type or object library, then un-check the checkbox.
- Click OK > Exit the Visual Basic Editor.
- Save the original Excel file.
- Try using the buttons or functions in question that previously didn’t work and they should now work normally.
An alternative for removing the reference is to restore the referenced file to the path specified in the references dialog box. If the referenced file is in a new location, clear the “Missing: ”reference and create a new reference to the file in its new location.
Way 4- Unregister & Reregister a Library to Fix Compile Error Can’t Find Project or Library Excel
Many users have reported that they solved Excel compile error: can’t find project or library by unregistering & re-registering the library file.
For this, follow the below steps:
- First, press the “Windows + R” keys together to open Run box >> type Regsvr32.exe.
- After this press Enter & type the complete path of a missing/lost library file. (E.g.- “regsvr32 “c:program filescommon filesmicrosoft shareddaodao360.dll”).
Once you are done and if the error still persists then simply unregister a library file.
Here’s how to do so:
Replace the “Regsvr32.exe” with “regsvr32 -u” & paste a path of a library again.
Also Read: Fix VBA Error 400 Running An Excel Macro
How to Repair Corrupt MS Excel File?
The above-mentioned manual solution will most probably sort out the issues and mentioned errors from the Excel file. But for any other corruption or file damage most suitable option would be to make use of the MS Excel Repair Tool.
This is is highly competent in restoring corrupt Excel files and also retrieves data from worksheets like cell comments, charts, other data, and worksheet properties. This is a professionally designed program that can easily repair .xls and .xlsx files.
* Free version of the product only previews recoverable data.
Steps to Utilize MS Excel Repair Tool:
Why Excel Is Showing Can’t Find Project Or Library Error?
- This error is usually caused by the user’s Excel program. The reason is that your program is referenced to such object or library which is missing. Due to which your Excel program is unable to find it. So the program is unable to use VB or Micro-based functions or buttons. This leads to an error message appearance.
- Since there are standard libraries so missing a library sounds like a bit of the last chance. Another reason for this, in that case, is that library miss-match occurs. For example, the user may have a library version of 2007 but the reference in the code may be looking for the 2010 version of that specific library. So the program fails to find the corresponding library thus issuing the compilation error.
- Sometimes a library may be toggled on or toggled off which causes a missing link issue between the library and program code. Therefore the compilation error occurs.
- Another reason for the error message is concerning the use of Microsoft XP which includes a reference to web service in the VBA project. When you run this project in MS Office 2003, the same compilation error appears. The reason is the same i.e. object or type of library is missing (or not found).
Conclusion:
Hope doing this will help you to fix the error Can’t find project or library Excel 2016, but if not then make use of the automatic third-party tool, this will help you to solve the error.
I tried my best to provide ample information about vba can’t find project or library errors and fixes.
However, if you are having any additional fixes or any queries then please share them with us.
Good Luck…
Priyanka is an entrepreneur & content marketing expert. She writes tech blogs and has expertise in MS Office, Excel, and other tech subjects. Her distinctive art of presenting tech information in the easy-to-understand language is very impressive. When not writing, she loves unplanned travels.
I am using Win8 x64 + Office 2013 x64.
MY PROBLEM:
I have an excel file, which has some modules in it, and works flawlessly in Office (Excel) x86. It uses the Swiss Ephemeris file (swedll32.dll) to do a lot of astronomical calculations.
However, when I try to run it on my end, which is on Excel x64, ASAP it’s opened, the VBA editor fires up and gives me the following error:
Compile error:
The code in this project must be updated for use on 64-bit systems.
Please review and update Declare statements and then mark them with the PtrSafe attribute.
As I said above, it works only in 32bit office (Excel) but it won’t work in my x64 Excel However there seems to be a workaround but I am too much of a novice to get it.
I am no good in VBA, however, after digging over the Internet, a few websites proposed that for 64bit office (Excel), we should amend (for each declaration) the codes to something like that:
- Original Statement: Private Declare Function
- Amended Statement: Private Declare PtrSafe Function
Unfortunately, after adding ‘PtrSafe‘ everywhere, though the VBA errors stopped, but the values are not being displayed/calculated properly in the cells.
From a post on 64 Bit in VBA from Microsoft, it would seem that we also need to modify some of the data types such as:
- Long → to → LongPtr
- LongPtr → to → LongLong
- and some «Long» are supposed to remain the same, depending on what they do.
This website (under «Which Longs should become LongPtr?») gives a clue though, as to how to know which one to modify.
I do not understand a thing about it and have no idea what should be done really to make this work in Office (Excel) x64. Someone who is pretty good at this, kindly please help me. Please.
note:
- Only the declarations that appeared in red, denoting that they contain errors have been dumped here. The remaining portion of the codes were not pasted here because they appear fine (green colored).
- For the Excel file to work properly on your computer, ensure that both the ‘swedll32.dll’ & the ‘JCalc Ver 0.2d.xls’ are in the same folder, after having extracting them.
Problem in Module Name: MainCalculations
'Swiss Ephemeris Release 1.60 9-jan-2000
'
' Declarations for Visual Basic 5.0
' The DLL file must exist in the same directory, or in a system
' directory where it can be found at runtime
'
Private Declare Function swe_azalt Lib "swedll32.dll" _
Alias "_swe_azalt@40" ( _
ByVal tjd_ut As Double, _
ByVal calc_flag As Long, _
ByRef geopos As Double, _
ByVal atpress As Double, _
ByVal attemp As Double, _
ByRef xin As Double, _
ByRef xaz As Double _
) As Long 'geopos must be the first of three array elements
'xin must be the first of two array elements
'xaz must be the first of three array elements
Private Declare Function swe_azalt_rev Lib "swedll32.dll" _
Alias "_swe_azalt_rev@24" ( _
ByVal tjd_ut As Double, _
ByVal calc_flag As Long, _
ByRef geopos As Double, _
ByRef xin As Double, _
ByRef xout As Double _
) As Long 'geopos must be the first of three array elements
'xin must be the first of two array elements
'xout must be the first of three array elements
Private Declare Function swe_calc Lib "swedll32.dll" _
Alias "_swe_calc@24" ( _
ByVal tjd As Double, _
ByVal ipl As Long, _
ByVal iflag As Long, _
ByRef X As Double, _
ByVal serr As String _
) As Long ' x must be first of six array elements
' serr must be able to hold 256 bytes
Private Declare Function swe_calc_d Lib "swedll32.dll" _
Alias "_swe_calc_d@20" ( _
ByRef tjd As Double, _
ByVal ipl As Long, _
ByVal iflag As Long, _
ByRef X As Double, _
ByVal serr As String _
) As Long ' x must be first of six array elements
' serr must be able to hold 256 bytes
Private Declare Function swe_calc_ut Lib "swedll32.dll" _
Alias "_swe_calc_ut@24" ( _
ByVal tjd_ut As Double, _
ByVal ipl As Long, _
ByVal iflag As Long, _
ByRef X As Double, _
ByVal serr As String _
) As Long ' x must be first of six array elements
' serr must be able to hold 256 bytes
Private Declare Function swe_calc_ut_d Lib "swedll32.dll" _
Alias "_swe_calc_ut_d@20" ( _
ByRef tjd_ut As Double, _
ByVal ipl As Long, _
ByVal iflag As Long, _
ByRef X As Double, _
ByVal serr As String _
) As Long ' x must be first of six array elements
' serr must be able to hold 256 bytes
Private Declare Function swe_close Lib "swedll32.dll" _
Alias "_swe_close@0" ( _
) As Long
Private Declare Function swe_close_d Lib "swedll32.dll" _
Alias "_swe_close_d@4" ( _
ByVal ivoid As Long _
) As Long ' argument ivoid is ignored
Private Declare Sub swe_cotrans Lib "swedll32.dll" _
Alias "_swe_cotrans@16" ( _
ByRef xpo As Double, _
ByRef xpn As Double, _
ByVal eps As Double _
)
Private Declare Function swe_cotrans_d Lib "swedll32.dll" _
Alias "_swe_cotrans_d@12" ( _
ByRef xpo As Double, _
ByRef xpn As Double, _
ByRef eps As Double _
) As Long
Private Declare Sub swe_cotrans_sp Lib "swedll32.dll" _
Alias "_swe_cotrans_sp@16" ( _
ByRef xpo As Double, _
ByRef xpn As Double, _
ByVal eps As Double _
)
Private Declare Function swe_cotrans_sp_d Lib "swedll32.dll" _
Alias "_swe_cotrans_sp_d@12" ( _
ByRef xpo As Double, _
ByRef xpn As Double, _
ByRef eps As Double _
) As Long
Private Declare Sub swe_cs2degstr Lib "swedll32.dll" _
Alias "_swe_cs2degstr@8" ( _
ByVal t As Long, _
ByVal S As String _
)
Private Declare Function swe_cs2degstr_d Lib "swedll32.dll" _
Alias "_swe_cs2degstr_d@8" ( _
ByVal t As Long, _
ByVal S As String _
) As Long
Private Declare Sub swe_cs2lonlatstr Lib "swedll32.dll" _
Alias "_swe_cs2lonlatstr@16" ( _
ByVal t As Long, _
ByVal pchar As Byte, _
ByVal mchar As Byte, _
ByVal S As String _
)
Private Declare Function swe_cs2lonlatstr_d Lib "swedll32.dll" _
Alias "_swe_cs2lonlatstr_d@16" ( _
ByVal t As Long, _
ByRef pchar As Byte, _
ByRef mchar As Byte, _
ByVal S As String _
) As Long
Private Declare Sub swe_cs2timestr Lib "swedll32.dll" _
Alias "_swe_cs2timestr@16" ( _
ByVal t As Long, _
ByVal sep As Long, _
ByVal supzero As Long, _
ByVal S As String _
)
Private Declare Function swe_cs2timestr_d Lib "swedll32.dll" _
Alias "_swe_cs2timestr_d@16" ( _
ByVal t As Long, _
ByVal sep As Long, _
ByVal supzero As Long, _
ByVal S As String _
) As Long
Private Declare Function swe_csnorm Lib "swedll32.dll" _
Alias "_swe_csnorm@4" ( _
ByVal P As Long _
) As Long
Private Declare Function swe_csnorm_d Lib "swedll32.dll" _
Alias "_swe_csnorm_d@4" ( _
ByVal P As Long _
) As Long
Private Declare Function swe_csroundsec Lib "swedll32.dll" _
Alias "_swe_csroundsec@4" ( _
ByVal P As Long _
) As Long
Private Declare Function swe_csroundsec_d Lib "swedll32.dll" _
Alias "_swe_csroundsec_d@4" ( _
ByVal P As Long _
) As Long
Private Declare Function swe_d2l Lib "swedll32.dll" _
Alias "_swe_d2l@8" ( _
) As Long
Private Declare Function swe_d2l_d Lib "swedll32.dll" _
Alias "_swe_d2l_d@4" ( _
) As Long
Private Declare Function swe_date_conversion Lib "swedll32.dll" _
Alias "_swe_date_conversion@28" ( _
ByVal Year As Long, _
ByVal Month As Long, _
ByVal Day As Long, _
ByVal utime As Double, _
ByVal cal As Byte, _
ByRef tjd As Double _
) As Long
Private Declare Function swe_date_conversion_d Lib "swedll32.dll" _
Alias "_swe_date_conversion_d@24" ( _
ByVal Year As Long, _
ByVal Month As Long, _
ByVal Day As Long, _
ByRef utime As Double, _
ByRef cal As Byte, _
ByRef tjd As Double _
) As Long
Private Declare Function swe_day_of_week Lib "swedll32.dll" _
Alias "_swe_day_of_week@8" ( _
ByVal JD As Double _
) As Long
Private Declare Function swe_day_of_week_d Lib "swedll32.dll" _
Alias "_swe_day_of_week_d@4" ( _
ByRef JD As Double _
) As Long
Private Declare Function swe_degnorm Lib "swedll32.dll" _
Alias "_swe_degnorm@8" ( _
ByVal JD As Double _
) As Double
Private Declare Function swe_degnorm_d Lib "swedll32.dll" _
Alias "_swe_degnorm_d@4" ( _
ByRef JD As Double _
) As Long
Private Declare Function swe_deltat Lib "swedll32.dll" _
Alias "_swe_deltat@8" ( _
ByVal JD As Double _
) As Double
Private Declare Function swe_deltat_d Lib "swedll32.dll" _
Alias "_swe_deltat_d@8" ( _
ByRef JD As Double, _
ByRef deltat As Double _
) As Long
Private Declare Function swe_difcs2n Lib "swedll32.dll" _
Alias "_swe_difcs2n@8" ( _
ByVal p1 As Long, _
ByVal p2 As Long _
) As Long
Private Declare Function swe_difcs2n_d Lib "swedll32.dll" _
Alias "_swe_difcs2n_d@8" ( _
ByVal p1 As Long, _
ByVal p2 As Long _
) As Long
Private Declare Function swe_difcsn Lib "swedll32.dll" _
Alias "_swe_difcsn@8" ( _
ByVal p1 As Long, _
ByVal p2 As Long _
) As Long
Private Declare Function swe_difcsn_d Lib "swedll32.dll" _
Alias "_swe_difcsn_d@8" ( _
ByVal p1 As Long, _
ByVal p2 As Long _
) As Long
Private Declare Function swe_difdeg2n Lib "swedll32.dll" _
Alias "_swe_difdeg2n@16" ( _
ByVal p1 As Double, _
ByVal p2 As Double _
) As Double
Private Declare Function swe_difdeg2n_d Lib "swedll32.dll" _
Alias "_swe_difdeg2n_d@12" ( _
ByRef p1 As Double, _
ByRef p2 As Double, _
ByRef Diff As Double _
) As Long
Private Declare Function swe_difdegn Lib "swedll32.dll" _
Alias "_swe_difdegn@16" ( _
ByVal p1 As Double, _
ByVal p2 As Double _
) As Long
Private Declare Function swe_difdegn_d Lib "swedll32.dll" _
Alias "_swe_difdegn_d@12" ( _
ByRef p1 As Double, _
ByRef p2 As Double, _
ByRef Diff As Double _
) As Long
Private Declare Function swe_fixstar Lib "swedll32.dll" _
Alias "_swe_fixstar@24" ( _
ByVal star As String, _
ByVal tjd As Double, _
ByVal iflag As Long, _
ByRef X As Double, _
ByVal serr As String _
) As Long ' x must be first of six array elements
' serr must be able to hold 256 bytes
' star must be able to hold 40 bytes
Private Declare Function swe_fixstar_d Lib "swedll32.dll" _
Alias "_swe_fixstar_d@20" ( _
ByVal star As String, _
ByRef tjd As Double, _
ByVal iflag As Long, _
ByRef X As Double, _
ByVal serr As String _
) As Long ' x must be first of six array elements
' serr must be able to hold 256 bytes
' star must be able to hold 40 bytes
Private Declare Function swe_fixstar_ut Lib "swedll32.dll" _
Alias "_swe_fixstar_ut@24" ( _
ByVal star As String, _
ByVal tjd_ut As Double, _
ByVal iflag As Long, _
ByRef X As Double, _
ByVal serr As String _
) As Long ' x must be first of six array elements
' serr must be able to hold 256 bytes
' star must be able to hold 40 bytes
Private Declare Function swe_fixstar_ut_d Lib "swedll32.dll" _
Alias "_swe_fixstar_ut_d@20" ( _
ByVal star As String, _
ByRef tjd_ut As Double, _
ByVal iflag As Long, _
ByRef X As Double, _
ByVal serr As String _
) As Long ' x must be first of six array elements
' serr must be able to hold 256 bytes
' star must be able to hold 40 bytes
Private Declare Function swe_get_ayanamsa Lib "swedll32.dll" _
Alias "_swe_get_ayanamsa@8" ( _
ByVal tjd_et As Double _
) As Double
Private Declare Function swe_get_ayanamsa_d Lib "swedll32.dll" _
Alias "_swe_get_ayanamsa_d@8" ( _
ByRef tjd_et As Double, _
ByRef ayan As Double _
) As Long
Private Declare Function swe_get_ayanamsa_ut Lib "swedll32.dll" _
Alias "_swe_get_ayanamsa_ut@8" ( _
ByVal tjd_ut As Double _
) As Double
Private Declare Function swe_get_ayanamsa_ut_d Lib "swedll32.dll" _
Alias "_swe_get_ayanamsa_ut_d@8" ( _
ByRef tjd_ut As Double, _
ByRef ayan As Double _
) As Long
Private Declare Sub swe_get_planet_name Lib "swedll32.dll" _
Alias "_swe_get_planet_name@8" ( _
ByVal ipl As Long, _
ByVal pname As String _
)
Private Declare Function swe_get_planet_name_d Lib "swedll32.dll" _
Alias "_swe_get_planet_name_d@8" ( _
ByVal ipl As Long, _
ByVal pname As String _
) As Long
Private Declare Function swe_get_tid_acc Lib "swedll32.dll" _
Alias "_swe_get_tid_acc@0" ( _
) As Double
Private Declare Function swe_get_tid_acc_d Lib "swedll32.dll" _
Alias "_swe_get_tid_acc_d@4" ( _
ByRef X As Double _
) As Long
Private Declare Function swe_houses Lib "swedll32.dll" _
Alias "_swe_houses@36" ( _
ByVal tjd_ut As Double, _
ByVal geolat As Double, _
ByVal geolon As Double, _
ByVal ihsy As Long, _
ByRef hcusps As Double, _
ByRef ascmc As Double _
) As Long ' hcusps must be first of 13 array elements
' ascmc must be first of 10 array elements
Private Declare Function swe_houses_d Lib "swedll32.dll" _
Alias "_swe_houses_d@24" ( _
ByRef tjd_ut As Double, _
ByRef geolat As Double, _
ByRef geolon As Double, _
ByVal ihsy As Long, _
ByRef hcusps As Double, _
ByRef ascmc As Double _
) As Long ' hcusps must be first of 13 array elements
' ascmc must be first of 10 array elements
Private Declare Function swe_houses_ex Lib "swedll32.dll" _
Alias "_swe_houses_ex@40" ( _
ByVal tjd_ut As Double, _
ByVal iflag As Long, _
ByVal geolat As Double, _
ByVal geolon As Double, _
ByVal ihsy As Long, _
ByRef hcusps As Double, _
ByRef ascmc As Double _
) As Long ' hcusps must be first of 13 array elements
' ascmc must be first of 10 array elements
Private Declare Function swe_houses_ex_d Lib "swedll32.dll" _
Alias "_swe_houses_ex_d@28" ( _
ByRef tjd_ut As Double, _
ByVal iflag As Long, _
ByRef geolat As Double, _
ByRef geolon As Double, _
ByVal ihsy As Long, _
ByRef hcusps As Double, _
ByRef ascmc As Double _
) As Long ' hcusps must be first of 13 array elements
' ascmc must be first of 10 array elements
Private Declare Function swe_houses_armc Lib "swedll32.dll" _
Alias "_swe_houses_armc@36" ( _
ByVal armc As Double, _
ByVal geolat As Double, _
ByVal eps As Double, _
ByVal ihsy As Long, _
ByRef hcusps As Double, _
ByRef ascmc As Double _
) As Long ' hcusps must be first of 13 array elements
' ascmc must be first of 10 array elements
Private Declare Function swe_houses_armc_d Lib "swedll32.dll" _
Alias "_swe_houses_armc_d@24" ( _
ByRef armc As Double, _
ByRef geolat As Double, _
ByRef eps As Double, _
ByVal ihsy As Long, _
ByRef hcusps As Double, _
ByRef ascmc As Double _
) As Long ' hcusps must be first of 13 array elements
' ascmc must be first of 10 array elements
Private Declare Function swe_house_pos Lib "swedll32.dll" _
Alias "_swe_house_pos@36" ( _
ByVal armc As Double, _
ByVal geolat As Double, _
ByVal eps As Double, _
ByVal ihsy As Long, _
ByRef xpin As Double, _
ByVal serr As String _
) As Double
' xpin must be first of 2 array elements
Private Declare Function swe_house_pos_d Lib "swedll32.dll" _
Alias "_swe_house_pos_d@28" ( _
ByRef armc As Double, _
ByRef geolat As Double, _
ByRef eps As Double, _
ByVal ihsy As Long, _
ByRef xpin As Double, _
ByRef hpos As Double, _
ByVal serr As String _
) As Long
' xpin must be first of 2 array elements
Private Declare Function swe_julday Lib "swedll32.dll" _
Alias "_swe_julday@24" ( _
ByVal Year As Long, _
ByVal Month As Long, _
ByVal Day As Long, _
ByVal hour As Double, _
ByVal gregflg As Long _
) As Double
Private Declare Function swe_julday_d Lib "swedll32.dll" _
Alias "_swe_julday_d@24" ( _
ByVal Year As Long, _
ByVal Month As Long, _
ByVal Day As Long, _
ByRef hour As Double, _
ByVal gregflg As Long, _
ByRef tjd As Double _
) As Long
Private Declare Function swe_lun_eclipse_how Lib "swedll32.dll" _
Alias "_swe_lun_eclipse_how@24" ( _
ByVal tjd_ut As Double, _
ByVal ifl As Long, _
ByRef geopos As Double, _
ByRef attr As Double, _
ByVal serr As String _
) As Long
Private Declare Function swe_lun_eclipse_how_d Lib "swedll32.dll" _
Alias "_swe_lun_eclipse_how_d@20" ( _
ByRef tjd_ut As Double, _
ByVal ifl As Long, _
ByRef geopos As Double, _
ByRef attr As Double, _
ByVal serr As String _
) As Long
Private Declare Function swe_lun_eclipse_when Lib "swedll32.dll" _
Alias "_swe_lun_eclipse_when@28" ( _
ByVal tjd_start As Double, _
ByVal ifl As Long, _
ByVal ifltype As Long, _
ByRef tret As Double, _
ByVal backward As Long, _
ByVal serr As String _
) As Long
Private Declare Function swe_lun_eclipse_when_d Lib "swedll32.dll" _
Alias "_swe_lun_eclipse_when_d@24" ( _
ByRef tjd_start As Double, _
ByVal ifl As Long, _
ByVal ifltype As Long, _
ByRef tret As Double, _
ByVal backward As Long, _
ByVal serr As String _
) As Long
Private Declare Function swe_nod_aps Lib "swedll32.dll" _
Alias "_swe_nod_aps@40" ( _
ByVal tjd_et As Double, _
ByVal ipl As Long, _
ByVal iflag As Long, _
ByVal method As Long, _
ByRef xnasc As Double, _
ByRef xndsc As Double, _
ByRef xperi As Double, _
ByRef xaphe As Double, _
ByVal serr As String _
) As Long
Private Declare Function swe_nod_aps_ut Lib "swedll32.dll" _
Alias "_swe_nod_aps_ut@40" ( _
ByVal tjd_ut As Double, _
ByVal ipl As Long, _
ByVal iflag As Long, _
ByVal method As Long, _
ByRef xnasc As Double, _
ByRef xndsc As Double, _
ByRef xperi As Double, _
ByRef xaphe As Double, _
ByVal serr As String _
) As Long
Private Declare Function swe_pheno Lib "swedll32.dll" _
Alias "_swe_pheno@24" ( _
ByVal tjd As Double, _
ByVal ipl As Long, _
ByVal iflag As Long, _
ByRef attr As Double, _
ByVal serr As String _
) As Long
Private Declare Function swe_pheno_ut Lib "swedll32.dll" _
Alias "_swe_pheno_ut@24" ( _
ByVal tjd As Double, _
ByVal ipl As Long, _
ByVal iflag As Long, _
ByRef attr As Double, _
ByVal serr As String _
) As Long
Private Declare Function swe_pheno_d Lib "swedll32.dll" _
Alias "_swe_pheno_d@20" ( _
ByRef tjd As Double, _
ByVal ipl As Long, _
ByVal iflag As Long, _
ByRef attr As Double, _
ByVal serr As String _
) As Long
Private Declare Function swe_pheno_ut_d Lib "swedll32.dll" _
Alias "_swe_pheno_ut_d@20" ( _
ByRef tjd As Double, _
ByVal ipl As Long, _
ByVal iflag As Long, _
ByRef attr As Double, _
ByVal serr As String _
) As Long
Private Declare Function swe_refrac Lib "swedll32.dll" _
Alias "_swe_refrac@28" ( _
ByVal inalt As Double, _
ByVal atpress As Double, _
ByVal attemp As Double, _
ByVal calc_flag As Long _
) As Double
Private Declare Sub swe_revjul Lib "swedll32.dll" _
Alias "_swe_revjul@28" ( _
ByVal tjd As Double, _
ByVal gregflg As Long, _
ByRef Year As Long, _
ByRef Month As Long, _
ByRef Day As Long, _
ByRef hour As Double _
)
Private Declare Function swe_revjul_d Lib "swedll32.dll" _
Alias "_swe_revjul_d@24" ( _
ByRef tjd As Double, _
ByVal gregflg As Long, _
ByRef Year As Long, _
ByRef Month As Long, _
ByRef Day As Long, _
ByRef hour As Double _
) As Long
Private Declare Function swe_rise_trans Lib "swedll32.dll" _
Alias "_swe_rise_trans@52" ( _
ByVal tjd_ut As Double, _
ByVal ipl As Long, _
ByVal starname As String, _
ByVal epheflag As Long, _
ByVal rsmi As Long, _
ByRef geopos As Double, _
ByVal atpress As Double, _
ByVal attemp As Double, _
ByRef tret As Double, _
ByVal serr As String _
) As Long
Private Declare Sub swe_set_ephe_path Lib "swedll32.dll" _
Alias "_swe_set_ephe_path@4" ( _
ByVal path As String _
)
Private Declare Function swe_set_ephe_path_d Lib "swedll32.dll" _
Alias "_swe_set_ephe_path_d@4" ( _
ByVal path As String _
) As Long
Private Declare Sub swe_set_jpl_file Lib "swedll32.dll" _
Alias "_swe_set_jpl_file@4" ( _
ByVal file As String _
)
Private Declare Function swe_set_jpl_file_d Lib "swedll32.dll" _
Alias "_swe_set_jpl_file_d@4" ( _
ByVal file As String _
) As Long
Private Declare Function swe_set_sid_mode Lib "swedll32.dll" _
Alias "_swe_set_sid_mode@20" ( _
ByVal sid_mode As Long, _
ByVal t0 As Double, _
ByVal ayan_t0 As Double _
) As Long
Private Declare Function swe_set_sid_mode_d Lib "swedll32.dll" _
Alias "_swe_sid_mode_d@12" ( _
ByVal sid_mode As Long, _
ByRef t0 As Double, _
ByRef ayan_t0 As Double _
) As Long
Private Declare Function swe_set_topo Lib "swedll32.dll" _
Alias "_swe_set_topo@24" ( _
ByVal geolon As Double, _
ByVal geolat As Double, _
ByVal altitude As Double _
)
Private Declare Function swe_set_topo_d Lib "swedll32.dll" _
Alias "_swe_set_topo_d@12" ( _
ByRef geolon As Double, _
ByRef geolat As Double, _
ByRef altitude As Double _
)
Private Declare Sub swe_set_tid_acc Lib "swedll32.dll" _
Alias "_swe_set_tid_acc@8" ( _
ByVal X As Double _
)
Private Declare Function swe_set_tid_acc_d Lib "swedll32.dll" _
Alias "_swe_set_tid_acc_d@4" ( _
ByRef X As Double _
) As Long
Private Declare Function swe_sidtime0 Lib "swedll32.dll" _
Alias "_swe_sidtime0@24" ( _
ByVal tjd_ut As Double, _
ByVal ecl As Double, _
ByVal nut As Double _
) As Double
Private Declare Function swe_sidtime0_d Lib "swedll32.dll" _
Alias "_swe_sidtime0_d@16" ( _
ByRef tjd_ut As Double, _
ByRef ecl As Double, _
ByRef nut As Double, _
ByRef sidt As Double _
) As Long
Private Declare Function swe_sidtime Lib "swedll32.dll" _
Alias "_swe_sidtime@8" ( _
ByVal tjd_ut As Double _
) As Double
Private Declare Function swe_sidtime_d Lib "swedll32.dll" _
Alias "_swe_sidtime_d@8" ( _
ByRef tjd_ut As Double, _
ByRef sidt As Double _
) As Long
Private Declare Function swe_sol_eclipse_how Lib "swedll32.dll" _
Alias "_swe_sol_eclipse_how@24" ( _
ByVal tjd_ut As Double, _
ByVal ifl As Long, _
ByRef geopos As Double, _
ByRef attr As Double, _
ByVal serr As String _
) As Long
Private Declare Function swe_sol_eclipse_how_d Lib "swedll32.dll" _
Alias "_swe_sol_eclipse_how_d@20" ( _
ByRef tjd_ut As Double, _
ByVal ifl As Long, _
ByRef geopos As Double, _
ByRef attr As Double, _
ByVal serr As String _
) As Long
Private Declare Function swe_sol_eclipse_when_glob Lib "swedll32.dll" _
Alias "_swe_sol_eclipse_when_glob@28" ( _
ByVal tjd_start As Double, _
ByVal ifl As Long, _
ByVal ifltype As Long, _
ByRef tret As Double, _
ByVal backward As Long, _
ByVal serr As String _
) As Long
Private Declare Function swe_sol_eclipse_when_glob_d Lib "swedll32.dll" _
Alias "_swe_sol_eclipse_when_glob_d@24" ( _
ByRef tjd_start As Double, _
ByVal ifl As Long, _
ByVal ifltype As Long, _
ByRef tret As Double, _
ByVal backward As Long, _
ByVal serr As String _
) As Long
Private Declare Function swe_sol_eclipse_when_loc Lib "swedll32.dll" _
Alias "_swe_sol_eclipse_when_loc@32" ( _
ByVal tjd_start As Double, _
ByVal ifl As Long, _
ByRef tret As Double, _
ByRef attr As Double, _
ByVal backward As Long, _
ByVal serr As String _
) As Long
Private Declare Function swe_sol_eclipse_when_loc_d Lib "swedll32.dll" _
Alias "_swe_sol_eclipse_when_loc_d@28" ( _
ByRef tjd_start As Double, _
ByVal ifl As Long, _
ByRef tret As Double, _
ByRef attr As Double, _
ByVal backward As Long, _
ByVal serr As String _
) As Long
Private Declare Function swe_sol_eclipse_where Lib "swedll32.dll" _
Alias "_swe_sol_eclipse_where@24" ( _
ByVal tjd_ut As Double, _
ByVal ifl As Long, _
ByRef geopos As Double, _
ByRef attr As Double, _
ByVal serr As String _
) As Long
Private Declare Function swe_sol_eclipse_where_d Lib "swedll32.dll" _
Alias "_swe_sol_eclipse_where_d@20" ( _
ByRef tjd_ut As Double, _
ByVal ifl As Long, _
ByRef geopos As Double, _
ByRef attr As Double, _
ByVal serr As String _
) As Long
Private Declare Function swe_time_equ Lib "swedll32.dll" _
Alias "_swe_time_equ@16" ( _
ByVal tjd_ut As Double, _
ByRef E As Double, _
ByRef serr As String _
) As Long