2000i VBA Problems

2000i VBA Problems

Anonymous
Not applicable
636 Views
14 Replies
Message 1 of 15

2000i VBA Problems

Anonymous
Not applicable
I installed 2000i on a Dell Inspiron / Windows 98. Also installed MS Office
2000. AutoCAD works fine until I try to access anything related to VBA,
i.e. the macro manager or design interface. I get an Access Violation error
and the program crashes.

Any Ideas?

Thanks...
0 Likes
637 Views
14 Replies
Replies (14)
Message 2 of 15

Anonymous
Not applicable
Try uninstalling AutoCAD, then reinstalling it.

"Robert P. Fahlin" wrote in message
news:32E305C09B601CA353A6D44501C08F71@in.WebX.SaUCah8kaAW...
> I installed 2000i on a Dell Inspiron / Windows 98. Also installed MS
Office
> 2000. AutoCAD works fine until I try to access anything related to VBA,
> i.e. the macro manager or design interface. I get an Access Violation
error
> and the program crashes.
>
> Any Ideas?
>
> Thanks...
>
0 Likes
Message 3 of 15

Anonymous
Not applicable
I did that several times but with the same result. I'm wondering if there
is some kind of conflict with other VBA enabled programs such as Office 2000
Developer.
0 Likes
Message 4 of 15

Anonymous
Not applicable
If you wrote your original programs in AutoCAD 2000 then you may be
experiencing a different between VBA 5 (AutoCAD 2000) and VBA 6 (AutoCAD
2000i). Not knowing or seeing your application and what it may be doing
makes it difficult to say.

Joe

"Robert P. Fahlin" wrote in message
news:62BE91907B5E075C2F04447BE99D687C@in.WebX.SaUCah8kaAW...
> I did that several times but with the same result. I'm wondering if there
> is some kind of conflict with other VBA enabled programs such as Office
2000
> Developer.
>
0 Likes
Message 5 of 15

Anonymous
Not applicable
Joe: I can't even get to the VBA development environment. With no projects
loaded, if I try to open the VBA editor, I get a Access Violation error and
CAD crashes.
0 Likes
Message 6 of 15

Anonymous
Not applicable

I'm wondering if there is some kind of conflict with other VBA enabled
programs such as Office 2000 Developer.


I'm running Acad 2Ki, Office 2000 Pro & Win98 SE on a Dell Inspiron 7500
with no VBA problems. Are you running Office Developer Edition? Could very
well be something different about that.
0 Likes
Message 7 of 15

Anonymous
Not applicable

I am having the same problem "GET"ting data from a running Excel 2010 program using Autocad 2000i VBA and Windows 10. 

The macro worked for years but I have not tried it in the last 5 years. Don't know what changed since then. 

0 Likes
Message 8 of 15

Ed__Jobe
Mentor
Mentor

Is your xl 2010 32 bit or 64 bit. acad vba is 32 bit and won't be able to talk to xl if its 64 bit.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 9 of 15

Anonymous
Not applicable

Thanks for the response, but everything is exactly the same as previously worked except the computer and Windows 10. Does the same Excel 2010 installation disk  install differently with different computers?

0 Likes
Message 10 of 15

Anonymous
Not applicable

The Excel 2010 used is 32 bit.

0 Likes
Message 11 of 15

Ed__Jobe
Mentor
Mentor

Can you post a screenshot of your References dialog?

Can you explain better what you mean by "GET"ing or any other warnings or errors?

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 12 of 15

Anonymous
Not applicable
Private Sub CommandButton1_Click()
Export DX AIR HANDLER Data to EQUIPSCHDX AutoCad Program
Dim objExcel As Object
Dim objExcelSheet As Object
On Error Resume Next
Set objExcel = GetObject(, "Excel.Application")
If Err <> 0 Then
Err.Clear
MsgBox "Excel is not running...", vbExclamation
Exit Sub
End If
On Error GoTo 0

0 Likes
Message 13 of 15

Ed__Jobe
Mentor
Mentor

Where's the screenshot? Also, the sub you posted will only work if xl is running. If its not running, you need to use CreateObject in your if..then..else statement.

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes
Message 14 of 15

Anonymous
Not applicable

Thanks for the response Ed. What is a screenshot? 

I was aware that Excel must be running, but it might help anyone not familiar with that. I am new to the site, but I am not new to VBA macro programming. I created two large and very successful copyrighted applications programs back in 2002 that use Excel to calculate HVAC systems performance data and auto-drafts that data to Autocad schedules, piping diagrams, and MS Word specifications, etc.

I am a professional mechanical engineer that enjoys programming using MS VB for applications and I am glad to meet new people who also enjoy it. I have been out of the loop for 5 years and am wondering why my Autocad VBA programs no longer recognize that 2010 Excel is already open and running. It used to recognize it. Feel free to contact me at Steve Crowl at rscpe@hotmail.com to discuss this further.

 

0 Likes
Message 15 of 15

Ed__Jobe
Mentor
Mentor

@Anonymous wrote:

Thanks for the response Ed. What is a screenshot? 

A screenshot is a capture of the screen, use the Print Screen button to capture the whole screen or Alt+PrintScreen to capture the active window. In the VBAIDE, open Tools>References an after the dialog opens, hit Alt+PrintScreen. Then paste from the clipboard into Windows Paint and save as a jpg. Upload the image to your reply.

 


@Anonymous wrote:

I was aware that Excel must be running, but it might help anyone not familiar with that.


My last post was meant to tell you that you don't need to have xl running. GetOjbect gets an instance of the app from the Running Object Table, ROT. CreatObject opens xl, creates a new instance, and passes that to the function, allowing you to open xl and load a file. So if you modify your if statement, it'll work both ways. As an example, see Norman's function in this thread.

 

Have you tried inserting a breakpoint in your sub and noticing what line the sub fails on? e.g. does the GetObject function fail or does it simply not return anything?

 

Something else to try is adding the version number to Excell.Application.##. Open REGEDIT and go to HKEY_Classes_Root, scroll down to excel.application and check what the version number is that you're using. Then modify the GetObject funtion by appending the version number as shown above.

 

Ed


Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.
How to post your code.

EESignature

0 Likes