LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default code works on some computers, but not on others

The following simple program is supposed to display one message box
containing the string "Jan", and a second one containing six month names
separated by dashes. At least one person reports getting this result from the
code, but when I run it on my two laptop computers, the first message box is
empty, and the second contains only the five dashes (no month names). All of
these are Windows XP PCs running Excel 2003. Any suggestions as to why this
is happening will be greatly appreciated.

Option Base 1
Dim Arr() As String

Sub assignArray()
ReDim Arr(5)

Arr(1) = €œJan€
Arr(2) = €œFeb€
Arr(3) = €œMar€
Arr(4) = €œApr€
Arr(5) = €œMay€

MsgBox Arr(1)

ReDim Preserve Arr(6)

Arr(6) = €œJun€

MsgBox Arr(1) + "-" + Arr(2) + "-" + Arr(3) + "-" + Arr(4) + "-" + Arr(5)
+ "-" + Arr(6)
End Sub
 
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
Formula only works on some computers Libby Excel Worksheet Functions 16 May 12th 08 02:02 PM
Macro works differently on different computers, same version of Ex oscardwilde Excel Discussion (Misc queries) 6 December 28th 05 11:22 PM
setfocus on control works on some computers and not others TomM Excel Programming 0 August 17th 05 02:32 PM
Why won't this code works ksnapp[_37_] Excel Programming 6 April 1st 04 01:44 PM
How can I distribute Workbook with VBA code and library references to other computers vrj Excel Programming 1 January 9th 04 08:35 PM


All times are GMT +1. The time now is 05:53 PM.

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

About Us

"It's about Microsoft Excel"