VBA
Discuss AutoCAD ActiveX and VBA (Visual Basic for Applications) questions here.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Overflow Error - AutoCAD 2011 VBA

3 REPLIES 3
Reply
Message 1 of 4
gooms
1208 Views, 3 Replies

Overflow Error - AutoCAD 2011 VBA

I am currently running into Overflow errors (Run-time error ‘6’) on my VBA functions (AutoCAD 2011). I’m wondering if anyone else is having similar issues. Here are steps on how to re-produce the error:

- Create a new VBA project
- Insert a new form (Userform1) with a single command button (CommandButton1)
- Copy the following code into Userform1

Private Sub CommandButton1_Click()
Dim d As Double
d = 1
End Sub

- Copy the following code into a new module (Module1):

Sub test()
UserForm1.Show
End Sub

- Now run “test” to show the form
- Clicking on the button results in "Run-time error '6': Overflow". (You may have to run “test” a couple of times to trigger the error.)

I am not really sure what is going on. Appreciate it if someone is willing to enlighten me if I'm missing anything.

Thanks,
Allen
3 REPLIES 3
Message 2 of 4
Anonymous
in reply to: gooms

It looks like Autodesk's budget for extending VBA support to 2011 wasn't very
large.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6367407@discussion.autodesk.com...
I am currently running into Overflow errors (Run-time error '6') on my VBA
functions (AutoCAD 2011). I'm wondering if anyone else is having similar issues.
Here are steps on how to re-produce the error:

- Create a new VBA project
- Insert a new form (Userform1) with a single command button (CommandButton1)
- Copy the following code into Userform1

Private Sub CommandButton1_Click()
Dim d As Double
d = 1
End Sub

- Copy the following code into a new module (Module1):

Sub test()
UserForm1.Show
End Sub

- Now run "test" to show the form
- Clicking on the button results in "Run-time error '6': Overflow". (You may
have to run "test" a couple of times to trigger the error.)

I am not really sure what is going on. Appreciate it if someone is willing to
enlighten me if I'm missing anything.

Thanks,
Allen
Message 3 of 4
gooms
in reply to: gooms

Tony, were you able to confirm this bug on your installation?


Additional Note: We are on a multi-monitor set up and it seems like this bug is triggered only when the VBA IDE and/or the Userform is displayed on the other monitor (separate from the main AutoCAD window).

-Allen
Message 4 of 4
Anonymous
in reply to: gooms

No, but it make sense because they're resorting to some
very ugly kludges to make the VBA IDE act like a window
that belongs to the AutoCAD process.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD
Supporting AutoCAD 2000 through 2011

http://www.acadxtabs.com

Email: string.Format("{0}@{1}.com", "tonyt", "caddzone");

wrote in message news:6367955@discussion.autodesk.com...
Tony, were you able to confirm this bug on your installation?


Additional Note: We are on a multi-monitor set up and it seems like this bug is
triggered only when the VBA IDE and/or the Userform is displayed on the other
monitor (separate from the main AutoCAD window).

-Allen

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost