<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error 91 - help plz in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908539#M26773</link>
    <description>amazing&lt;BR /&gt;
I've never had an error that didn't highlight, afair&lt;BR /&gt;
&lt;BR /&gt;
Mark&lt;BR /&gt;
&lt;BR /&gt;
"Joe Sutphin" &lt;JOESUTPHIN&gt; wrote in message&lt;BR /&gt;
news:5511201@discussion.autodesk.com...&lt;BR /&gt;
Never on an error of that type. Version 2007 but if my old memory serves me&lt;BR /&gt;
I don't believe I've ever seen highlighting on an error of this type.&lt;BR /&gt;
&lt;BR /&gt;
Joe ...&lt;/JOESUTPHIN&gt;</description>
    <pubDate>Wed, 07 Mar 2007 23:30:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-03-07T23:30:30Z</dc:date>
    <item>
      <title>Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908527#M26761</link>
      <description>Hi, I'd be very grateful for a pointer as to why this code doesn't work. It is to update the numeric value in a block attribute. I am very inexperienced in VBA so there is probably a glaring mistake. Thanks.&lt;BR /&gt;
&lt;BR /&gt;
Sub updlev()&lt;BR /&gt;
&lt;BR /&gt;
Dim varAttributes As Variant&lt;BR /&gt;
Dim ssetObj As AcadSelectionSet&lt;BR /&gt;
Dim i, j As Integer&lt;BR /&gt;
Dim entSSet As AcadObject&lt;BR /&gt;
Dim oldlev, newlev As Single&lt;BR /&gt;
Dim newlevStr As String&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
On Error GoTo Errorhandler&lt;BR /&gt;
&lt;BR /&gt;
ssetObj.Delete&lt;BR /&gt;
&lt;BR /&gt;
Set ssetObj = ThisDrawing.SelectionSets.Add("BLOCKSET")&lt;BR /&gt;
&lt;BR /&gt;
Dim gpCode(0) As Integer&lt;BR /&gt;
Dim dataValue(0) As Variant&lt;BR /&gt;
    gpCode(0) = 0&lt;BR /&gt;
    dataValue(0) = "Insert"&lt;BR /&gt;
&lt;BR /&gt;
Dim groupCode As Variant, dataCode As Variant&lt;BR /&gt;
    groupCode = gpCode&lt;BR /&gt;
    dataCode = dataValue&lt;BR /&gt;
&lt;BR /&gt;
    ssetObj.SelectOnScreen gpCode, dataValue&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    For i = 0 To ssetObj.Count - 1&lt;BR /&gt;
        Set entSSet = ssetObj.Item(i)&lt;BR /&gt;
&lt;BR /&gt;
            varAttributes = entSSet.GetAttributes&lt;BR /&gt;
&lt;BR /&gt;
            For j = LBound(varAttributes) To UBound(varAttributes)&lt;BR /&gt;
                 If varAttributes(j).TagString = "0.00" Then&lt;BR /&gt;
                    oldlev = Val(varAttributes(j).TextString)&lt;BR /&gt;
                    newlev = oldlev - 28.16&lt;BR /&gt;
                    newlevStr = Str(newlev)&lt;BR /&gt;
                    varAttributes(j).TextString = newlevStr&lt;BR /&gt;
                 Exit For&lt;BR /&gt;
                 End If&lt;BR /&gt;
            Next j&lt;BR /&gt;
    Next i&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ssetObj.Delete&lt;BR /&gt;
Exit Sub 'avoid error handler&lt;BR /&gt;
&lt;BR /&gt;
Errorhandler:&lt;BR /&gt;
    ssetObj.Delete&lt;BR /&gt;
    MsgBox "An error was encountered, please try again", vbOKOnly&lt;BR /&gt;
&lt;BR /&gt;
End Sub</description>
      <pubDate>Wed, 07 Mar 2007 12:04:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908527#M26761</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-07T12:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908528#M26762</link>
      <description>generally "this code doesn't work" isnt' a very specific diagnosis to go&lt;BR /&gt;
on...&lt;BR /&gt;
what line throws the error, what exactly is happening, etc are usually&lt;BR /&gt;
helpful additions&lt;BR /&gt;
:-)&lt;BR /&gt;
in this case however it does appear to have an obvious problem, see below&lt;BR /&gt;
hth&lt;BR /&gt;
Mark&lt;BR /&gt;
&lt;BR /&gt;
&lt;KEITHXP&gt; wrote in message news:5510350@discussion.autodesk.com...&lt;BR /&gt;
Hi, I'd be very grateful for a pointer as to why this code doesn't work. It&lt;BR /&gt;
is to update the numeric value in a block attribute. I am very inexperienced&lt;BR /&gt;
in VBA so there is probably a glaring mistake. Thanks.&lt;BR /&gt;
&lt;BR /&gt;
Sub updlev()&lt;BR /&gt;
&lt;BR /&gt;
Dim varAttributes As Variant&lt;BR /&gt;
Dim ssetObj As AcadSelectionSet&lt;BR /&gt;
Dim i, j As Integer&lt;BR /&gt;
Dim entSSet As AcadObject&lt;BR /&gt;
Dim oldlev, newlev As Single&lt;BR /&gt;
Dim newlevStr As String&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
On Error GoTo Errorhandler&lt;BR /&gt;
&lt;BR /&gt;
----------- i would expect to get an error here, because ssetObj is Nothing&lt;BR /&gt;
at this point&lt;BR /&gt;
ssetObj.Delete&lt;BR /&gt;
&lt;BR /&gt;
'----- other than that it looks like it would work&lt;BR /&gt;
&lt;BR /&gt;
Set ssetObj = ThisDrawing.SelectionSets.Add("BLOCKSET")&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Dim gpCode(0) As Integer&lt;BR /&gt;
Dim dataValue(0) As Variant&lt;BR /&gt;
    gpCode(0) = 0&lt;BR /&gt;
    dataValue(0) = "Insert"&lt;BR /&gt;
&lt;BR /&gt;
Dim groupCode As Variant, dataCode As Variant&lt;BR /&gt;
    groupCode = gpCode&lt;BR /&gt;
    dataCode = dataValue&lt;BR /&gt;
&lt;BR /&gt;
    ssetObj.SelectOnScreen gpCode, dataValue&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    For i = 0 To ssetObj.Count - 1&lt;BR /&gt;
        Set entSSet = ssetObj.Item(i)&lt;BR /&gt;
&lt;BR /&gt;
            varAttributes = entSSet.GetAttributes&lt;BR /&gt;
&lt;BR /&gt;
            For j = LBound(varAttributes) To UBound(varAttributes)&lt;BR /&gt;
                 If varAttributes(j).TagString = "0.00" Then&lt;BR /&gt;
                    oldlev = Val(varAttributes(j).TextString)&lt;BR /&gt;
                    newlev = oldlev - 28.16&lt;BR /&gt;
                    newlevStr = Str(newlev)&lt;BR /&gt;
                    varAttributes(j).TextString = newlevStr&lt;BR /&gt;
                 Exit For&lt;BR /&gt;
                 End If&lt;BR /&gt;
            Next j&lt;BR /&gt;
    Next i&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ssetObj.Delete&lt;BR /&gt;
Exit Sub 'avoid error handler&lt;BR /&gt;
&lt;BR /&gt;
Errorhandler:&lt;BR /&gt;
    ssetObj.Delete&lt;BR /&gt;
    MsgBox "An error was encountered, please try again", vbOKOnly&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;/KEITHXP&gt;</description>
      <pubDate>Wed, 07 Mar 2007 14:26:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908528#M26762</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-07T14:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908529#M26763</link>
      <description>Keith,&lt;BR /&gt;
&lt;BR /&gt;
Here is how I would do it.&lt;BR /&gt;
&lt;BR /&gt;
Joe ...&lt;BR /&gt;
&lt;BR /&gt;
Sub updlev()&lt;BR /&gt;
Dim varAttributes As Variant&lt;BR /&gt;
Dim ssetObj As AcadSelectionSet&lt;BR /&gt;
Dim i, j As Integer&lt;BR /&gt;
Dim entSSet As AcadBlockReference        'changed the data type to blockref&lt;BR /&gt;
Dim oldlev, newlev As Single&lt;BR /&gt;
Dim newlevStr As String&lt;BR /&gt;
  'change the way you're handling errors&lt;BR /&gt;
  On Error Resume Next&lt;BR /&gt;
&lt;BR /&gt;
  ThisDrawing.SelectionSets("BLOCKSET").Delete&lt;BR /&gt;
  Set ssetObj = ThisDrawing.SelectionSets.Add("BLOCKSET")&lt;BR /&gt;
&lt;BR /&gt;
  On Error GoTo 0&lt;BR /&gt;
&lt;BR /&gt;
  Dim gpCode(0) As Integer&lt;BR /&gt;
  Dim dataValue(0) As Variant&lt;BR /&gt;
&lt;BR /&gt;
    gpCode(0) = 0&lt;BR /&gt;
    dataValue(0) = "Insert"&lt;BR /&gt;
&lt;BR /&gt;
  Dim groupCode As Variant, dataCode As Variant&lt;BR /&gt;
    groupCode = gpCode&lt;BR /&gt;
    dataCode = dataValue&lt;BR /&gt;
&lt;BR /&gt;
    ssetObj.SelectOnScreen gpCode, dataValue&lt;BR /&gt;
&lt;BR /&gt;
    For i = 0 To ssetObj.Count - 1&lt;BR /&gt;
      Set entSSet = ssetObj.Item(i)&lt;BR /&gt;
      If entSSet.HasAttributes Then                    'added this line&lt;BR /&gt;
        varAttributes = entSSet.GetAttributes&lt;BR /&gt;
&lt;BR /&gt;
        For j = LBound(varAttributes) To UBound(varAttributes)&lt;BR /&gt;
          If varAttributes(j).TagString = "0.00" Then&lt;BR /&gt;
            oldlev = Val(varAttributes(j).TextString)&lt;BR /&gt;
            newlev = oldlev - 28.16&lt;BR /&gt;
            newlevStr = Str(newlev)&lt;BR /&gt;
            varAttributes(j).TextString = newlevStr&lt;BR /&gt;
            Exit For&lt;BR /&gt;
          End If&lt;BR /&gt;
        Next j&lt;BR /&gt;
      End If&lt;BR /&gt;
    Next i&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;KEITHXP&gt; wrote in message news:5510350@discussion.autodesk.com...&lt;BR /&gt;
Hi, I'd be very grateful for a pointer as to why this code doesn't work. It &lt;BR /&gt;
is to update the numeric value in a block attribute. I am very inexperienced &lt;BR /&gt;
in VBA so there is probably a glaring mistake. Thanks.&lt;BR /&gt;
&lt;BR /&gt;
Sub updlev()&lt;BR /&gt;
&lt;BR /&gt;
Dim varAttributes As Variant&lt;BR /&gt;
Dim ssetObj As AcadSelectionSet&lt;BR /&gt;
Dim i, j As Integer&lt;BR /&gt;
Dim entSSet As AcadObject&lt;BR /&gt;
Dim oldlev, newlev As Single&lt;BR /&gt;
Dim newlevStr As String&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
On Error GoTo Errorhandler&lt;BR /&gt;
&lt;BR /&gt;
ssetObj.Delete&lt;BR /&gt;
&lt;BR /&gt;
Set ssetObj = ThisDrawing.SelectionSets.Add("BLOCKSET")&lt;BR /&gt;
&lt;BR /&gt;
Dim gpCode(0) As Integer&lt;BR /&gt;
Dim dataValue(0) As Variant&lt;BR /&gt;
    gpCode(0) = 0&lt;BR /&gt;
    dataValue(0) = "Insert"&lt;BR /&gt;
&lt;BR /&gt;
Dim groupCode As Variant, dataCode As Variant&lt;BR /&gt;
    groupCode = gpCode&lt;BR /&gt;
    dataCode = dataValue&lt;BR /&gt;
&lt;BR /&gt;
    ssetObj.SelectOnScreen gpCode, dataValue&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
    For i = 0 To ssetObj.Count - 1&lt;BR /&gt;
        Set entSSet = ssetObj.Item(i)&lt;BR /&gt;
&lt;BR /&gt;
            varAttributes = entSSet.GetAttributes&lt;BR /&gt;
&lt;BR /&gt;
            For j = LBound(varAttributes) To UBound(varAttributes)&lt;BR /&gt;
                 If varAttributes(j).TagString = "0.00" Then&lt;BR /&gt;
                    oldlev = Val(varAttributes(j).TextString)&lt;BR /&gt;
                    newlev = oldlev - 28.16&lt;BR /&gt;
                    newlevStr = Str(newlev)&lt;BR /&gt;
                    varAttributes(j).TextString = newlevStr&lt;BR /&gt;
                 Exit For&lt;BR /&gt;
                 End If&lt;BR /&gt;
            Next j&lt;BR /&gt;
    Next i&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
ssetObj.Delete&lt;BR /&gt;
Exit Sub 'avoid error handler&lt;BR /&gt;
&lt;BR /&gt;
Errorhandler:&lt;BR /&gt;
    ssetObj.Delete&lt;BR /&gt;
    MsgBox "An error was encountered, please try again", vbOKOnly&lt;BR /&gt;
&lt;BR /&gt;
End Sub&lt;/KEITHXP&gt;</description>
      <pubDate>Wed, 07 Mar 2007 15:28:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908529#M26763</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-07T15:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908530#M26764</link>
      <description>Sorry if my message wasn't clear enough - I thought the 'error 91' would be sufficient.&lt;BR /&gt;
Strangely, when I got the error the debugger did not highlight any particular bit of code. I tried narrowing it down by commenting out sections but no luck.&lt;BR /&gt;
&lt;BR /&gt;
Anyway thank you to both posters for quick fixes - very kind.&lt;BR /&gt;
&lt;BR /&gt;
Keith</description>
      <pubDate>Wed, 07 Mar 2007 16:32:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908530#M26764</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-07T16:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908531#M26765</link>
      <description>Can I ask one more newbie question.&lt;BR /&gt;
&lt;BR /&gt;
If my macro is evaluating 48.36 - 25.16, how do I end up with 25.20 and NOT 25.2?&lt;BR /&gt;
&lt;BR /&gt;
I've tried Format(x-y, "0.00") but it doesn't seem to do the trick.&lt;BR /&gt;
&lt;BR /&gt;
thanks again.</description>
      <pubDate>Wed, 07 Mar 2007 17:07:14 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908531#M26765</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-07T17:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908532#M26766</link>
      <description>Yes, I was a little heavy handed there, sorry...&lt;BR /&gt;
the error 91 was a good enough indication in this case, and the error was&lt;BR /&gt;
obvious enough&lt;BR /&gt;
sometimes it's not that obvious and the more info given the better...&lt;BR /&gt;
&lt;BR /&gt;
so you're saying when you get the error message, you hit the debug button&lt;BR /&gt;
and it doesn't go to that line ???&lt;BR /&gt;
&lt;BR /&gt;
Sub testSelSetDelete()&lt;BR /&gt;
Dim ss As AcadSelectionSet&lt;BR /&gt;
ss.Delete&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
if you run that, and hit debug on the error dialog, does that not take you&lt;BR /&gt;
to the second line?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;KEITHXP&gt; wrote in message news:5510760@discussion.autodesk.com...&lt;BR /&gt;
Sorry if my message wasn't clear enough - I thought the 'error 91' would be&lt;BR /&gt;
sufficient.&lt;BR /&gt;
Strangely, when I got the error the debugger did not highlight any&lt;BR /&gt;
particular bit of code. I tried narrowing it down by commenting out sections&lt;BR /&gt;
but no luck.&lt;BR /&gt;
&lt;BR /&gt;
Anyway thank you to both posters for quick fixes - very kind.&lt;BR /&gt;
&lt;BR /&gt;
Keith&lt;/KEITHXP&gt;</description>
      <pubDate>Wed, 07 Mar 2007 17:36:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908532#M26766</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-07T17:36:03Z</dc:date>
    </item>
    <item>
      <title>Re: Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908533#M26767</link>
      <description>&lt;KEITHXP&gt; wrote in message news:5510827@discussion.autodesk.com...&lt;BR /&gt;
Can I ask one more newbie question.&lt;BR /&gt;
&lt;BR /&gt;
If my macro is evaluating 48.36 - 25.16, how do I end up with 25.20 and NOT&lt;BR /&gt;
25.2?&lt;BR /&gt;
&lt;BR /&gt;
I've tried Format(x-y, "0.00") but it doesn't seem to do the trick.&lt;BR /&gt;
&lt;BR /&gt;
thanks again.&lt;BR /&gt;
&lt;BR /&gt;
it should work...try this&lt;BR /&gt;
paste into immediate window&lt;BR /&gt;
?Format(48.36 - 25.16, "0.00")&lt;BR /&gt;
23.20&lt;BR /&gt;
&lt;BR /&gt;
hth&lt;BR /&gt;
Mark&lt;/KEITHXP&gt;</description>
      <pubDate>Wed, 07 Mar 2007 17:44:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908533#M26767</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-07T17:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908534#M26768</link>
      <description>The error was generated by the line you pointed out "Object or With block &lt;BR /&gt;
variable not set".&lt;BR /&gt;
&lt;BR /&gt;
It does not highlight the line in question like an "End    Debug" does in VB &lt;BR /&gt;
but it does the leave the cursor at the start of the line.&lt;BR /&gt;
&lt;BR /&gt;
Joe ...&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
"MP" &lt;NOSPAM&gt; wrote in message &lt;BR /&gt;
news:5510868@discussion.autodesk.com...&lt;BR /&gt;
Yes, I was a little heavy handed there, sorry...&lt;BR /&gt;
the error 91 was a good enough indication in this case, and the error was&lt;BR /&gt;
obvious enough&lt;BR /&gt;
sometimes it's not that obvious and the more info given the better...&lt;BR /&gt;
&lt;BR /&gt;
so you're saying when you get the error message, you hit the debug button&lt;BR /&gt;
and it doesn't go to that line ???&lt;BR /&gt;
&lt;BR /&gt;
Sub testSelSetDelete()&lt;BR /&gt;
Dim ss As AcadSelectionSet&lt;BR /&gt;
ss.Delete&lt;BR /&gt;
End Sub&lt;BR /&gt;
&lt;BR /&gt;
if you run that, and hit debug on the error dialog, does that not take you&lt;BR /&gt;
to the second line?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;KEITHXP&gt; wrote in message news:5510760@discussion.autodesk.com...&lt;BR /&gt;
Sorry if my message wasn't clear enough - I thought the 'error 91' would be&lt;BR /&gt;
sufficient.&lt;BR /&gt;
Strangely, when I got the error the debugger did not highlight any&lt;BR /&gt;
particular bit of code. I tried narrowing it down by commenting out sections&lt;BR /&gt;
but no luck.&lt;BR /&gt;
&lt;BR /&gt;
Anyway thank you to both posters for quick fixes - very kind.&lt;BR /&gt;
&lt;BR /&gt;
Keith&lt;/KEITHXP&gt;&lt;/NOSPAM&gt;</description>
      <pubDate>Wed, 07 Mar 2007 18:07:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908534#M26768</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-07T18:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908535#M26769</link>
      <description>"Joe Sutphin" &lt;JOESUTPHIN&gt; wrote in message&lt;BR /&gt;
news:5510917@discussion.autodesk.com...&lt;BR /&gt;
The error was generated by the line you pointed out "Object or With block&lt;BR /&gt;
variable not set".&lt;BR /&gt;
&lt;BR /&gt;
It does not highlight the line in question like an "End    Debug" does in VB&lt;BR /&gt;
but it does the leave the cursor at the start of the line.&lt;BR /&gt;
&lt;BR /&gt;
Joe ...&lt;BR /&gt;
&lt;BR /&gt;
that's interesting...vba ide does highlight errors here the same as vb ide.&lt;BR /&gt;
are you actually saying that your acad vbaide does not highlight errors?&lt;BR /&gt;
&lt;BR /&gt;
I wonder what the difference is?&lt;BR /&gt;
&lt;BR /&gt;
Mark&lt;/JOESUTPHIN&gt;</description>
      <pubDate>Wed, 07 Mar 2007 18:13:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908535#M26769</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-07T18:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908536#M26770</link>
      <description>I don't have a clue but I know what you're referring to and mine does not &lt;BR /&gt;
highlight inside of VBA IDE on this particular error. The only option I get &lt;BR /&gt;
is OK. Click on OK and poof ...&lt;BR /&gt;
&lt;BR /&gt;
Joe ...&lt;BR /&gt;
&lt;BR /&gt;
"MP" &lt;NOSPAM&gt; wrote in message &lt;BR /&gt;
news:5510945@discussion.autodesk.com...&lt;BR /&gt;
"Joe Sutphin" &lt;JOESUTPHIN&gt; wrote in message&lt;BR /&gt;
news:5510917@discussion.autodesk.com...&lt;BR /&gt;
The error was generated by the line you pointed out "Object or With block&lt;BR /&gt;
variable not set".&lt;BR /&gt;
&lt;BR /&gt;
It does not highlight the line in question like an "End    Debug" does in VB&lt;BR /&gt;
but it does the leave the cursor at the start of the line.&lt;BR /&gt;
&lt;BR /&gt;
Joe ...&lt;BR /&gt;
&lt;BR /&gt;
that's interesting...vba ide does highlight errors here the same as vb ide.&lt;BR /&gt;
are you actually saying that your acad vbaide does not highlight errors?&lt;BR /&gt;
&lt;BR /&gt;
I wonder what the difference is?&lt;BR /&gt;
&lt;BR /&gt;
Mark&lt;/JOESUTPHIN&gt;&lt;/NOSPAM&gt;</description>
      <pubDate>Wed, 07 Mar 2007 18:39:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908536#M26770</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-07T18:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908537#M26771</link>
      <description>"Joe Sutphin" &lt;JOESUTPHIN&gt; wrote in message&lt;BR /&gt;
news:5510975@discussion.autodesk.com...&lt;BR /&gt;
I don't have a clue but I know what you're referring to and mine does not&lt;BR /&gt;
highlight inside of VBA IDE on this particular error. The only option I get&lt;BR /&gt;
is OK. Click on OK and poof ...&lt;BR /&gt;
&lt;BR /&gt;
Joe ...&lt;BR /&gt;
&lt;BR /&gt;
thats unusual!&lt;BR /&gt;
&lt;BR /&gt;
what version?&lt;BR /&gt;
&lt;BR /&gt;
are you saying you never get highlighting on an object not set condition?&lt;BR /&gt;
but you do on other errors?&lt;BR /&gt;
or only testing the op's code sample?&lt;BR /&gt;
Mark&lt;/JOESUTPHIN&gt;</description>
      <pubDate>Wed, 07 Mar 2007 19:57:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908537#M26771</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-07T19:57:57Z</dc:date>
    </item>
    <item>
      <title>Re: Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908538#M26772</link>
      <description>Never on an error of that type. Version 2007 but if my old memory serves me &lt;BR /&gt;
I don't believe I've ever seen highlighting on an error of this type.&lt;BR /&gt;
&lt;BR /&gt;
Joe ...&lt;BR /&gt;
&lt;BR /&gt;
"MP" &lt;NOSPAM&gt; wrote in message &lt;BR /&gt;
news:5511102@discussion.autodesk.com...&lt;BR /&gt;
"Joe Sutphin" &lt;JOESUTPHIN&gt; wrote in message&lt;BR /&gt;
news:5510975@discussion.autodesk.com...&lt;BR /&gt;
I don't have a clue but I know what you're referring to and mine does not&lt;BR /&gt;
highlight inside of VBA IDE on this particular error. The only option I get&lt;BR /&gt;
is OK. Click on OK and poof ...&lt;BR /&gt;
&lt;BR /&gt;
Joe ...&lt;BR /&gt;
&lt;BR /&gt;
thats unusual!&lt;BR /&gt;
&lt;BR /&gt;
what version?&lt;BR /&gt;
&lt;BR /&gt;
are you saying you never get highlighting on an object not set condition?&lt;BR /&gt;
but you do on other errors?&lt;BR /&gt;
or only testing the op's code sample?&lt;BR /&gt;
Mark&lt;/JOESUTPHIN&gt;&lt;/NOSPAM&gt;</description>
      <pubDate>Wed, 07 Mar 2007 21:00:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908538#M26772</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-07T21:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908539#M26773</link>
      <description>amazing&lt;BR /&gt;
I've never had an error that didn't highlight, afair&lt;BR /&gt;
&lt;BR /&gt;
Mark&lt;BR /&gt;
&lt;BR /&gt;
"Joe Sutphin" &lt;JOESUTPHIN&gt; wrote in message&lt;BR /&gt;
news:5511201@discussion.autodesk.com...&lt;BR /&gt;
Never on an error of that type. Version 2007 but if my old memory serves me&lt;BR /&gt;
I don't believe I've ever seen highlighting on an error of this type.&lt;BR /&gt;
&lt;BR /&gt;
Joe ...&lt;/JOESUTPHIN&gt;</description>
      <pubDate>Wed, 07 Mar 2007 23:30:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908539#M26773</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-07T23:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908540#M26774</link>
      <description>Hi -&lt;BR /&gt;
&lt;BR /&gt;
You are right, the Format function does give the correct result. It is the conversion to a string which is omitting the trailing zero.&lt;BR /&gt;
&lt;BR /&gt;
?str(43.30) gives 43.3&lt;BR /&gt;
&lt;BR /&gt;
I've done a search in help and cannot find how to get the trailing zero included.  Other than counting characters after the decimal point and adding a zero if necessary (which seems crazy), I cannot find a way of doing this.&lt;BR /&gt;
&lt;BR /&gt;
Thanks

Forget this post. Just realized Format is already returning a string, it works fine without the Str() function. Thanks.&lt;BR /&gt;
Message was edited by: KeithXP</description>
      <pubDate>Thu, 08 Mar 2007 08:27:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908540#M26774</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-08T08:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908541#M26775</link>
      <description>I don't do enough VB programming to be definitive, but I am using VBA as included with Acad 2007 (VBA v6.5). I do find that generally code errors are highlighted in yellow.&lt;BR /&gt;
&lt;BR /&gt;
In the case of 'Run time error 91. Object Variable or With Block variable not set' , the error dialog has only OK or Cancel (no Debug button). On hitting OK I am simply returned to the editor with the cursor where it was when I ran the code.&lt;BR /&gt;
&lt;BR /&gt;
Keith</description>
      <pubDate>Thu, 08 Mar 2007 08:32:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908541#M26775</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-08T08:32:51Z</dc:date>
    </item>
    <item>
      <title>Re: Error 91 - help plz</title>
      <link>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908542#M26776</link>
      <description>I am not as experienced as Joe orMP, but I also remember a s few times where errors were not highlighted. I had to write to a  text file throughout my code to pin down where the general error may be. I have also noticed a few things that I have done to improve the way my code works, and so I have not gotten this issue in a while. Perhaps Mark is using a better coding process. If so, it would be nice to see how he gets around it. I do not have the time to pick through this though.&lt;BR /&gt;
&lt;BR /&gt;
Dave</description>
      <pubDate>Thu, 08 Mar 2007 14:07:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/error-91-help-plz/m-p/1908542#M26776</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-08T14:07:43Z</dc:date>
    </item>
  </channel>
</rss>

