Display an Array in a MsgBox? 
Author Message
 Display an Array in a MsgBox?

Is there a way to display an Array of variable length inside a Msgbox?

Example:

    MsgBox "Indents Parsed" & vbCr & vbCr & _
           For I = 1 To (HighIndent  - LowIndent  + 1)
             "Indent: " & I & " Amt: " & TopCount(I)
           & vbCr & _
           Next I
           , vbExclamation _
           , "Indents Parsed"



Tue, 21 Jun 2005 23:30:58 GMT  
 Display an Array in a MsgBox?
Dim intLoop As Integer
Dim strOutput As String

     For intLoop = LBound(TopCount) To UBound(TopCount)
          strOutput = strOutput & "Indent: " & intLoop & " Amt: " &
TopCount(intLoop) & vbCrLf
     Next intLoop

     MsgBox "Indents Parsed" & vbCrLf & vbCrLf & _
            strOutput & _
            , vbExclamation _
            , "Indents Parsed"

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele


Quote:
> Is there a way to display an Array of variable length inside a Msgbox?

> Example:

>     MsgBox "Indents Parsed" & vbCr & vbCr & _
>            For I = 1 To (HighIndent  - LowIndent  + 1)
>              "Indent: " & I & " Amt: " & TopCount(I)
>            & vbCr & _
>            Next I
>            , vbExclamation _
>            , "Indents Parsed"



Wed, 22 Jun 2005 00:14:58 GMT  
 Display an Array in a MsgBox?
Thank You - Chris



Quote:
> Dim intLoop As Integer
> Dim strOutput As String

>      For intLoop = LBound(TopCount) To UBound(TopCount)
>           strOutput = strOutput & "Indent: " & intLoop & " Amt: " &
> TopCount(intLoop) & vbCrLf
>      Next intLoop

>      MsgBox "Indents Parsed" & vbCrLf & vbCrLf & _
>             strOutput & _
>             , vbExclamation _
>             , "Indents Parsed"

> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele



> > Is there a way to display an Array of variable length inside a Msgbox?

> > Example:

> >     MsgBox "Indents Parsed" & vbCr & vbCr & _
> >            For I = 1 To (HighIndent  - LowIndent  + 1)
> >              "Indent: " & I & " Amt: " & TopCount(I)
> >            & vbCr & _
> >            Next I
> >            , vbExclamation _
> >            , "Indents Parsed"



Wed, 22 Jun 2005 00:33:52 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Access 97 - Application.Quit does not work if msgbox is displayed

2. Help with the syntax for Msgbox to display multiple lines

3. msgbox align text and display for period of time

4. MsgBox (?) to display all active variables

5. msgbox/alert to display a message if field is left blank

6. display msgbox with out causing default beep

7. MsgBox and Displaying time problems

8. MsgBox and displaying variables in a string

9. MsgBox causes displayed form to disappear, why?

10. How to display a msgbox without buttons?

11. Change Event not occuring while MsgBox is displayed

12. Why msgbox can display Integer!

 

 
Powered by phpBB® Forum Software