Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default What could be wrong?

My guess is that you are using XL97.
You cannot assign to an array unless you are using XL2000 or later...
monArr = Split(mon, " ")
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware



"Playing WMA files in squence"
m
wrote in message
Hello,
In a While loop I am trying to create a few Worksheets and rename them as
"Jan. 2006" or "Jul. 2006" etc... Here is what I have in an array of string:
Dim mon As String
Dim monArr() As String
mon = "Jan. Feb. Mar. Apr. May. Jun. Jul. Aug. Sep. Oct. Nov. Dec. "
monArr = Split(mon, " ")
In the While loop I execute the following code if m is less than 13.
sheetName = monArr(m) & Year(Date)
MsgBox sheetName
Worksheets.Add after:=Sheets(i)
ActiveSheet.Name = sheetName
I get the dialog box displaying "2006" and my sheet name is named as "2006"!
On the statement "sheetName = monArr(m) & Year(Date)" when m=1,2,3 or
....12, what is wrong that I do not get "Jan. 2006" or "Feb. 2006".... etc on
the MsgBox sheetName or "Jan. 2006" or "Feb, 2006" for as name for my
Worksheet?
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
Insert Calculated Field (wrong Qty*Price = wrong Amount) Edmund Excel Discussion (Misc queries) 8 October 4th 07 12:13 PM
What Am I Doing Wrong comparini3000 Excel Discussion (Misc queries) 1 June 12th 06 05:51 PM
What is wrong with this bach Excel Discussion (Misc queries) 0 September 6th 05 09:09 AM
Am I doing something wrong here? TyeJae[_21_] Excel Programming 2 June 29th 04 12:56 AM
What's Wrong with This? D[_6_] Excel Programming 9 June 18th 04 05:50 PM


All times are GMT +1. The time now is 05:08 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"