Author Topic: VBA Error Trapping  (Read 1973 times)

0 Members and 1 Guest are viewing this topic.

ronjonp

  • Needs a day job
  • Posts: 7025
VBA Error Trapping
« on: October 26, 2004, 09:44:50 AM »
I'm trying to setup a vba routine to set variables. How do I go about error trapping if the variable can't be set to a value or it does't exist?


Public Sub setvariables()

    ThisDrawing.SetVariable "apbox", 1
    ThisDrawing.SetVariable "attdia", 1
    ThisDrawing.SetVariable "attmode", 1
    ThisDrawing.SetVariable "auditctl", 0

End Sub

Thanks,

Ron

Windows 10 x64 - AutoCAD /C3D 2020

Custom Build PC

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16717
  • Superior Stupidity at its best
VBA Error Trapping
« Reply #1 on: October 26, 2004, 09:55:57 AM »
On Error GoTo 'label'
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal