Hi R.K.,
Attached is the ".dvb" code file........please let me know if you can identify what is at the root of the problem....?
Thanks again,
Vince
|
|
|
Hi R.K.,
Attached is the ".dvb" code file........please let me know if you can identify what is at the root of the problem....?
Thanks again,
Vince
That file is not the same one from which your screenshots were taken...
Attachment 76884
Attachment 76902
R.K. McSwain | CAD Panacea |
R.K.,
I am sorry about that......I have a number of different routines and I accidently grabbed the wrong one. The correct one is attached below...!
Regards,
Vince
Ok, "SBar" is the name for a Status Bar control (Microsoft Status Bar Active X Control - Version 6) - which on my system is generated from "C:\Windows\SysWOW64\mscomctl.ocx"...
Not sure if you have this ocx file and/or if it's registered, but it's missing from your first screen shot and present for me (see attached image).
So, long story short.... the code is trying to change properties of this control, but is unable to do so because it doesn't exist, and there is no error handling for this situation - hence the "crash" (or at least stopping of the code execution...)
vbaerr.png
As a workaround, in the VBAIDE, press Ctrl+F to search for "SBar" (make sure to search in 'Current Project')
In every place you find it, put an apostrophe in front of that entire line of code (commenting out the line).
Uh, hang on.... inside of the Private Sub cmdBrowse_Click, you will need to comment out the entire IF statement that looks like this:
Code:'If lstAvail.ListCount <> 0 Then ' SBar.SimpleText = "...Select .dwg(s) To Plot" ' Else: SBar.SimpleText = "...Please Select Directory" ' End If
It should work now - unless of course there are other controls missing/not registered
Lastly - this was tested on Land Desktop 2009, running on Win7x64
R.K. McSwain | CAD Panacea |
Hi R.K.,
Commenting out the SBar lines of code seemed to make the selection of the drawing files work OK but sometines I had to click the Arrow button that transfers the files from the "Select Drawings Folder" to the "Drawings To Plot" window many times to get it to work. Then I ran into other problems when I tried to Plot.
If you had no problems running the code in your environment......would it be possible for you to send me a list or screen shot of the modules you have loaded in the References portion of the code. Maybe I can identify what is missing and needs to be loaded.
Thanks again,
Vince
Another gotcha when using Windows 7 is file permission/access.
The error messages are not always clear that this is the issue.
Try launching AutoCAD as Administrator. It should be a right-click option on the AutoCAD icon.
Also, remember that any ocx or dll files that you register must be registered as administrator.
It may not fix the problem but it would at least rule out the issue.
R.K. McSwain | CAD Panacea |
Hi All,
I have a VBA plugin used in Autocad.This plugin works fine in windows xp and windows 2003 server(64bit) but it fails in Win7(64bit) machine.
Error is that the pop up window which is MODAL and which should in front is coming in background in case of Win7(64 bit.)
If somebody have any information about this or any way around, please let me know.
Cheers
Rajiv