I have an old macro from 2006 that works on 2013. but when i run it on 2014 i get a compile error.
Compile error:
the code in this project must be updated fo ruse on 64-bit systems.
Please review the update Declare statements then mark them with
the PtrSafe attributes.
i have no idea what it is trying to tell me
I am only guessing.
Have you change references?
if you post your code, I can help more usefully.
There is no file attached. Take a look at attached file. I mean check your reference it may be the reason of your problem. it does not matter if I saw error massage or not. You had already wrote error message. But strongly reference problem I guess.
Hello,
think we've got simmilar problems. We're running little macro on AutoCAD 2012 which is after switching to AutoCAD 2015 - WIN7 64bit machines not running any longer.
Getting a compile error too.
Compile error:
the code in this project must be updated fo ruse on 64-bit systems.
Please review the update Declare statements then mark them with
the PtrSafe attributes.
Is there anyone who could help me out getting this trunning on 64bit again?
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public Beenden As Double 'Variable für Auswertung Programmabbruch / Programmende
Public Sub MenuLoad()
'Modul-Version 06.09.06
On Local Error Resume Next
'Werkzeugkasten "Wood-Tools_2004" laden
Dim MGroup As AcadMenuGroup
Dim MenuFile As String
MenuFile = "C:\Programme\AutoCAD 2004\Wood-Tools\Wood-Tools_ACAD2004_v4-1.mnu"
Set MGroup = Application.MenuGroups.Load(MenuFile)
ThisDrawing.Utility.Prompt "" & vbNewLine & "* WoodTools_2004 erfolgreich geladen *"
'Farbeinstellungen
Application.Preferences.Display.GraphicsWinModelBackgrndColor = 0 'Hintergrundfarbe Schwarz
Application.Preferences.Display.ModelCrosshairColor = RGB(255, 234, 0) 'Fadenkreuzfarbe Gelb
Application.Preferences.Drafting.AutoSnapMarkerColor = acRed 'Farbe der Objektfang-Pickbox Rot
'Start-Dialogfeld einblenden
Startdialog.lbl_Version.Caption = "Version 4.0"
Startdialog.lbl_Datum.Caption = "stand 01.10.2006"
Startdialog.lbl_edition.Caption = "basic - edition"
'Startdialog.lbl_edition.Caption = "professional - edition"
Startdialog.Show
'Logo in ProgressBar
ThisDrawing.SetVariable "MODEMACRO", "Wood-Tools 2004 " & Startdialog.lbl_edition.Caption
End Sub
That is due to the change of VBA from 32bit (VBA6.x) to 64 bit (VBA7.x), where the declaration of Win "kernal32" must be updated. The "Sleep" declaration should be in 64-bit VBA:
Private Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal ms As LongPtr)
If you searched the Internet, you would have found a lot links on this topic. Here is one of them that provides exactly the information you need:
http://support.microsoft.com/kb/983043
HTH
Thanks for guiding me in the right direction!
Just think i`m not able to change what you've discribed or is written in the ms dokument, don't know anything about VBA and think this thing will we hard to get under control even when it's just a quick change to the data.
Just a joiner you know..?!