<?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: in VBA Forum</title>
    <link>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301246#M66906</link>
    <description>Here is the first part of your problem&lt;BR /&gt;
&lt;BR /&gt;
        strGridA = "A"&lt;BR /&gt;
        intIndex = 0&lt;BR /&gt;
&lt;BR /&gt;
        Do&lt;BR /&gt;
            dblCurDist = .GetDistance(, "Enter the distance from grid " &amp;amp; strGridA &amp;amp; " to grid " &amp;amp; strGridA + 1)&lt;BR /&gt;
&lt;BR /&gt;
You are setting strGridA to a literal then trying to adding the numeral "1" to it.&lt;BR /&gt;
&lt;BR /&gt;
If you comment out the "On Error Resume Next" line you will have more success finding errors - since you're really not doing any error checking - just skipping right on ...</description>
    <pubDate>Mon, 13 Jan 2003 11:05:05 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2003-01-13T11:05:05Z</dc:date>
    <item>
      <title>Do... While Loop Question</title>
      <link>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301243#M66903</link>
      <description>Hello, I'm pretty new to VBA so go easy on me but here's my question.  The&lt;BR /&gt;
code below doesn't work, no error, nothing.  It just seems to never get&lt;BR /&gt;
there or it skips it completely, I'm not sure which.  There is a&lt;BR /&gt;
Select...Case function right above it that runs exactly how it should but&lt;BR /&gt;
then it just ends, thanks.  I'm trying to get dimensions in the X direction&lt;BR /&gt;
for a grid system that I'm going to draw with the provided input.  I put&lt;BR /&gt;
each given dimension into an array of Variants called varXdims, here's the&lt;BR /&gt;
code:&lt;BR /&gt;
&lt;BR /&gt;
        strGridA = "A"&lt;BR /&gt;
        intIndex = 0&lt;BR /&gt;
&lt;BR /&gt;
        Do&lt;BR /&gt;
            dblCurDist = .GetDistance(, "Enter the distance from grid " &amp;amp;&lt;BR /&gt;
strGridA &amp;amp; " to grid " &amp;amp; strGridA + 1)&lt;BR /&gt;
            ReDim Preserve varXDims(UBound(varXDims) + 1)&lt;BR /&gt;
            varXDims(intIndex) = .DistanceToReal(dblCurDist,&lt;BR /&gt;
acArchitectural)&lt;BR /&gt;
            strGridA = strGridA + 1&lt;BR /&gt;
            intIndex = intIndex + 1&lt;BR /&gt;
        Loop Until blnCheck = IsEmpty(varXDims(intIndex))&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
matthew g.</description>
      <pubDate>Mon, 13 Jan 2003 10:36:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301243#M66903</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-01-13T10:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Do... While Loop Question</title>
      <link>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301244#M66904</link>
      <description>Matthew Gonzalez had this to say&lt;BR /&gt;
:&lt;BR /&gt;
&amp;gt; There is a Select...Case function right above it that runs exactly how&lt;BR /&gt;
it&lt;BR /&gt;
&amp;gt; should but then it just ends, thanks.&lt;BR /&gt;
&lt;BR /&gt;
We're gonna need to see that.&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
Someone left the grass out in the yard all night.&lt;BR /&gt;
http://www.acadx.com</description>
      <pubDate>Mon, 13 Jan 2003 10:49:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301244#M66904</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-01-13T10:49:55Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301245#M66905</link>
      <description>Here is the entire thing so far, obviously not complete but I was trying to&lt;BR /&gt;
do it in chunks and check myself for basic functionality along the way.&lt;BR /&gt;
Here you go, I hope word wrap doesn't murder it too badly:&lt;BR /&gt;
&lt;BR /&gt;
Option Explicit&lt;BR /&gt;
&lt;BR /&gt;
Public Sub DrawGridSystem()&lt;BR /&gt;
&lt;BR /&gt;
Dim varXDims() As Variant&lt;BR /&gt;
Dim varYDims() As Variant&lt;BR /&gt;
Dim intADirection As Integer&lt;BR /&gt;
Dim dblOrigin(2) As Double&lt;BR /&gt;
Dim dblDwgScale As Double&lt;BR /&gt;
Dim dblCurDist As Double&lt;BR /&gt;
Dim strDirection As String&lt;BR /&gt;
Dim strLocation As String&lt;BR /&gt;
Dim strGridA As String&lt;BR /&gt;
Dim strGrid1 As String&lt;BR /&gt;
Dim intIndex As Integer&lt;BR /&gt;
Dim blnCheck As Boolean&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
On Error Resume Next&lt;BR /&gt;
&lt;BR /&gt;
    With ThisDrawing.Utility&lt;BR /&gt;
        .InitializeUserInput 1, "Vert Horiz"&lt;BR /&gt;
        strDirection = .GetKeyword(vbCr &amp;amp; "Letters should be [Vert/Horiz]:&lt;BR /&gt;
")&lt;BR /&gt;
        Select Case UCase(strDirection)&lt;BR /&gt;
            Case "VERT"&lt;BR /&gt;
               .InitializeUserInput 1, "Top Bottom"&lt;BR /&gt;
               strLocation = .GetKeyword(vbCr &amp;amp; "A at [Top/Bottom]: ")&lt;BR /&gt;
&lt;BR /&gt;
            Case "HORIZ"&lt;BR /&gt;
                .InitializeUserInput 1, "Left Right"&lt;BR /&gt;
                strLocation = .GetKeyword(vbCr &amp;amp; "A at [Left/Right]: ")&lt;BR /&gt;
&lt;BR /&gt;
            Case Else&lt;BR /&gt;
                MsgBox "Invalid Input"&lt;BR /&gt;
        End Select&lt;BR /&gt;
&lt;BR /&gt;
        strGridA = "A"&lt;BR /&gt;
        intIndex = 0&lt;BR /&gt;
&lt;BR /&gt;
        Do&lt;BR /&gt;
            dblCurDist = .GetDistance(, "Enter the distance from grid " &amp;amp;&lt;BR /&gt;
strGridA &amp;amp; " to grid " &amp;amp; strGridA + 1)&lt;BR /&gt;
            ReDim Preserve varXDims(UBound(varXDims) + 1)&lt;BR /&gt;
            varXDims(intIndex) = .DistanceToReal(dblCurDist,&lt;BR /&gt;
acArchitectural)&lt;BR /&gt;
            strGridA = strGridA + 1&lt;BR /&gt;
            intIndex = intIndex + 1&lt;BR /&gt;
        Loop Until blnCheck = IsEmpty(varXDims(intIndex))&lt;BR /&gt;
&lt;BR /&gt;
    End With&lt;BR /&gt;
End Sub</description>
      <pubDate>Mon, 13 Jan 2003 10:58:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301245#M66905</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-01-13T10:58:25Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301246#M66906</link>
      <description>Here is the first part of your problem&lt;BR /&gt;
&lt;BR /&gt;
        strGridA = "A"&lt;BR /&gt;
        intIndex = 0&lt;BR /&gt;
&lt;BR /&gt;
        Do&lt;BR /&gt;
            dblCurDist = .GetDistance(, "Enter the distance from grid " &amp;amp; strGridA &amp;amp; " to grid " &amp;amp; strGridA + 1)&lt;BR /&gt;
&lt;BR /&gt;
You are setting strGridA to a literal then trying to adding the numeral "1" to it.&lt;BR /&gt;
&lt;BR /&gt;
If you comment out the "On Error Resume Next" line you will have more success finding errors - since you're really not doing any error checking - just skipping right on ...</description>
      <pubDate>Mon, 13 Jan 2003 11:05:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301246#M66906</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-01-13T11:05:05Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301247#M66907</link>
      <description>This line will not work either&lt;BR /&gt;
&lt;BR /&gt;
&lt;PRE&gt;&lt;BR /&gt;
ReDim Preserve varXDims(UBound(varXDims) + 1)&lt;BR /&gt;
&lt;/PRE&gt;&lt;BR /&gt;
&lt;BR /&gt;
since varXDims has yet to be dimensioned it has no UBound value.</description>
      <pubDate>Mon, 13 Jan 2003 11:09:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301247#M66907</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-01-13T11:09:42Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301248#M66908</link>
      <description>I already tried it without the "On Error Resume Next" and there was no&lt;BR /&gt;
difference.  Are you saying that in VBA I cannot increment a String?  If&lt;BR /&gt;
that is the case then how do I change an "A" to a "B" to a "C" and so&lt;BR /&gt;
forth?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
matthew g.</description>
      <pubDate>Mon, 13 Jan 2003 11:10:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301248#M66908</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-01-13T11:10:11Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301249#M66909</link>
      <description>&amp;gt; This line will not work either&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; ReDim Preserve varXDims(UBound(varXDims) + 1)&lt;BR /&gt;
&amp;gt; since varXDims has yet to be dimensioned it has no UBound value.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
So what is common practice to get around that?  Fill in the first slot with&lt;BR /&gt;
a zero and then just skip that one when I go to get my actual numbers from&lt;BR /&gt;
the array or is there something cleaner?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
matthew g.</description>
      <pubDate>Mon, 13 Jan 2003 11:22:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301249#M66909</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-01-13T11:22:03Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301250#M66910</link>
      <description>"Matthew Gonzalez" &lt;MATTHEW.GONZALEZGO&gt; wrote in message&lt;BR /&gt;
news:C5A9D4906DD79B22A70035C32E159439@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt; This line will not work either&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; ReDim Preserve varXDims(UBound(varXDims) + 1)&lt;BR /&gt;
&amp;gt; &amp;gt; since varXDims has yet to be dimensioned it has no UBound value.&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; So what is common practice to get around that?  Fill in the first slot&lt;BR /&gt;
with&lt;BR /&gt;
&amp;gt; a zero and then just skip that one when I go to get my actual numbers from&lt;BR /&gt;
&amp;gt; the array or is there something cleaner?&lt;BR /&gt;
&lt;BR /&gt;
In your case, wouldn't&lt;BR /&gt;
&lt;BR /&gt;
ReDim Preserve varXDims(intIndex)&lt;BR /&gt;
&lt;BR /&gt;
work?&lt;/MATTHEW.GONZALEZGO&gt;</description>
      <pubDate>Mon, 13 Jan 2003 11:23:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301250#M66910</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-01-13T11:23:32Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301251#M66911</link>
      <description>&amp;gt;&lt;BR /&gt;
&amp;gt; In your case, wouldn't&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; ReDim Preserve varXDims(intIndex)&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; work?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
I don't see why not, and that's a whole lot cleaner looking too.  Thanks&lt;BR /&gt;
adam.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
matthew g.</description>
      <pubDate>Mon, 13 Jan 2003 11:29:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301251#M66911</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-01-13T11:29:26Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301252#M66912</link>
      <description>"Matthew Gonzalez" &lt;MATTHEW.GONZALEZGO&gt; wrote in message&lt;BR /&gt;
news:8E7FDA9CEDF6C5DE9229FED7DCF76756@in.WebX.maYIadrTaRb...&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; In your case, wouldn't&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; ReDim Preserve varXDims(intIndex)&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt; &amp;gt; work?&lt;BR /&gt;
&amp;gt; &amp;gt;&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; I don't see why not, and that's a whole lot cleaner looking too.  Thanks&lt;BR /&gt;
&amp;gt; adam.&lt;BR /&gt;
&lt;BR /&gt;
Better thank Frank, too.  I had the same question a few weeks back, and&lt;BR /&gt;
that's how he straightened me out.&lt;/MATTHEW.GONZALEZGO&gt;</description>
      <pubDate>Mon, 13 Jan 2003 11:29:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301252#M66912</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-01-13T11:29:49Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301253#M66913</link>
      <description>function increment_string(char) as string&lt;BR /&gt;
    increment_string = chr(asc(char) + 1)&lt;BR /&gt;
end function&lt;BR /&gt;
ofcourse you will have to check for the end of the alphabet.&lt;BR /&gt;
&lt;BR /&gt;
Tom Craft&lt;BR /&gt;
Matthew Gonzalez wrote:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; I already tried it without the "On Error Resume Next" and there was no&lt;BR /&gt;
&amp;gt; difference.  Are you saying that in VBA I cannot increment a String?  If&lt;BR /&gt;
&amp;gt; that is the case then how do I change an "A" to a "B" to a "C" and so&lt;BR /&gt;
&amp;gt; forth?&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&amp;gt; --&lt;BR /&gt;
&amp;gt; matthew g.</description>
      <pubDate>Mon, 13 Jan 2003 12:56:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301253#M66913</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-01-13T12:56:27Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301254#M66914</link>
      <description>Thanks Tom, I wasn't turning anything up in the help files.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
matthew g.</description>
      <pubDate>Tue, 14 Jan 2003 08:44:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301254#M66914</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-01-14T08:44:15Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301255#M66915</link>
      <description>&amp;gt;&lt;BR /&gt;
&amp;gt; Better thank Frank, too.  I had the same question a few weeks back, and&lt;BR /&gt;
&amp;gt; that's how he straightened me out.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
Thanks Frank.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
matthew g.</description>
      <pubDate>Tue, 14 Jan 2003 08:44:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301255#M66915</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-01-14T08:44:47Z</dc:date>
    </item>
    <item>
      <title>Re:</title>
      <link>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301256#M66916</link>
      <description>&amp;gt; function increment_string(char) as string&lt;BR /&gt;
&amp;gt;     increment_string = chr(asc(char) + 1)&lt;BR /&gt;
&amp;gt; end function&lt;BR /&gt;
&amp;gt; ofcourse you will have to check for the end of the alphabet.&lt;BR /&gt;
&amp;gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
And it works great!  Thanks again.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
--&lt;BR /&gt;
matthew g.</description>
      <pubDate>Fri, 17 Jan 2003 15:56:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vba-forum/do-while-loop-question/m-p/301256#M66916</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2003-01-17T15:56:09Z</dc:date>
    </item>
  </channel>
</rss>

