Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help displaying array contents

I have an array of strings that I'm wanting to display to the user. All
I've been able to do is use the MsgBox command in a loop to display
things one at a time, but I can only get MsgBox to display one line at
a time.

I want to be able to show all my results in one message box that pops
up for the user.

My array basically contains results from a spreadsheet update macro
(basically a log file).

Thanks.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 493
Default Need help displaying array contents

One way:

Dim i As Integer
Dim msg As String
For i = LBound(sArr) To UBound(sArr)
msg = msg & vbNewLine & sArr(i)
Next i
MsgBox Mid(msg, 2)

where sArr is your array of strings.

In article ,
jsatz wrote:

I have an array of strings that I'm wanting to display to the user. All
I've been able to do is use the MsgBox command in a loop to display
things one at a time, but I can only get MsgBox to display one line at
a time.

I want to be able to show all my results in one message box that pops
up for the user.

My array basically contains results from a spreadsheet update macro
(basically a log file).

Thanks.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help displaying array contents

That did it.

Thanks!



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need help displaying array contents

That did it.

Thanks!



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~ View and post usenet messages directly from http://www.ExcelForum.com/

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying cell contents BlueAngel Excel Discussion (Misc queries) 3 March 6th 10 01:12 AM
Displaying Cell Contents ajones1978 Excel Discussion (Misc queries) 3 September 10th 08 10:35 PM
Displaying contents of 2 cells in another Seb Warmoth[_2_] Excel Worksheet Functions 4 March 13th 07 01:11 PM
Displaying cell contents on one sheet Peter J Watson Excel Discussion (Misc queries) 2 April 28th 06 12:25 AM
Displaying contents of cell on different spreadsheet telewats Excel Discussion (Misc queries) 1 January 26th 06 04:58 PM


All times are GMT +1. The time now is 11:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"