Raincode:
Your VBA code is incompatible with x64.
Consider to remove VBA dependency.
Here is the snippet:
(defun play-sound (url)
(vl-load-com)
(vlax-put-property (cond (*windowsmediaplayer*)
((setq *windowsmediaplayer* (vlax-create-object "WMPlayer.OCX"))))
'url url))
I am not familiar with VBA code. What does the above code do ?
The exaple provided is not VBA code, this is VisualLisp. It plays sound files (wma, mp3 & others supported by Windows Media Player). Should work with AutoCAD 2000 & above (x32/x64), BricsCAD (x32/x64), ZWCAD, GstarCAD, progeCAD and probably CorelCAD (heck, what a zoo!)
try (your path to file may vary):
(play-sound "c:\\windows\\media\\tada.wav")
Your sound playing code depends on VBA DVB files. VBA DVB code is not supported in BricsCAD x64. AutoCAD 2009 & above supports VBA with additional module instalation only. AutoCAD x64 VBA needs different code (it's about function pointers).
To make your code more portable I recommend to rewrite sound routines using only VisualLisp. You may use my snippet for it.
But this thing only run on Acad ver 2002.
With a little modification it should run under all above mentioned CADs.