From: JLGWhiz on 3 Apr 2010 22:53 This has apparently been a very boring Saturday. <vbg> "kylefoley2000" <kylefoley2000(a)discussions.microsoft.com> wrote in message news:8C228318-C238-4DCA-B282-CB949990CB6F(a)microsoft.com... > what does chr$ mean in this code > > Sub rick() > Dim strabc(1 To 26) As String > Dim i As Integer > Dim strprompt As String > For i = 1 To 26 > strabc(i) = Chr$(i + 64) > Next i > strprompt = "hey:" & vbCrLf > For i = 1 To 26 > strprompt = strprompt & strabc(i) > Next i > MsgBox strprompt > > > End Sub
From: JLatham on 4 Apr 2010 01:03 Naaaahhhh... Boring would have been telling him that the second loop is going to output hey: A followed by hey: B followed by hey: C ad nauseum, or until sleep overcomes one of us! <g> "JLGWhiz" wrote: > This has apparently been a very boring Saturday. <vbg> > > > "kylefoley2000" <kylefoley2000(a)discussions.microsoft.com> wrote in message > news:8C228318-C238-4DCA-B282-CB949990CB6F(a)microsoft.com... > > what does chr$ mean in this code > > > > Sub rick() > > Dim strabc(1 To 26) As String > > Dim i As Integer > > Dim strprompt As String > > For i = 1 To 26 > > strabc(i) = Chr$(i + 64) > > Next i > > strprompt = "hey:" & vbCrLf > > For i = 1 To 26 > > strprompt = strprompt & strabc(i) > > Next i > > MsgBox strprompt > > > > > > End Sub > > > . >
From: Joe User on 4 Apr 2010 01:04 "JLatham" <JLatham(a)discussions.microsoft.com> wrote: > In the Beginning there was BASIC and in BASIC there was CHR$(), > but there was no CHR(). Likewise there was DIR$() and it was without > DIR(). "In the beginning", BASIC had no type declarations. Instead, the type was implied by naming conventions. Original BASIC had only string and numeric variables. Some versions of BASIC evolved additional naming conventions, such as suffixes to distinguish integer and floating-point variables. All of this predates Microsoft and MS BASIC by about two decades, and it predates the ANSI BASIC standard by more than a decade. So what? That is really a very different language than MS Visual BASIC and VBA. ----- original message ----- "JLatham" <JLatham(a)discussions.microsoft.com> wrote in message news:82581CAD-21E8-4367-947A-CFAA422A30F7(a)microsoft.com... > And to add yet more confusion to the whole thing: > In the Beginning there was BASIC and in BASIC there was CHR$(), but there > was no CHR(). Likewise there was DIR$() and it was without DIR(). And > there > are similar examples of the original BASIC language that had the $ as a > required part of the function name that have operators now that have > dropped > the $ and yet act in exactly the same manner, and are generally > interchangeable. > > "kylefoley2000" wrote: > >> what does chr$ mean in this code >> >> Sub rick() >> Dim strabc(1 To 26) As String >> Dim i As Integer >> Dim strprompt As String >> For i = 1 To 26 >> strabc(i) = Chr$(i + 64) >> Next i >> strprompt = "hey:" & vbCrLf >> For i = 1 To 26 >> strprompt = strprompt & strabc(i) >> Next i >> MsgBox strprompt >> >> >> End Sub
First
|
Prev
|
Pages: 1 2 3 Prev: Removing artifacts from a spreadsheet with VBA Next: like a Pivot Table |