Message 1 of 4
Overflow Error - AutoCAD 2011 VBA

Not applicable
04-05-2010
05:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
- 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