Passing a string into an Array

Results 1 to 2 of 2

Thread: Passing a string into an Array

  1. #1
    Join Date
    Dec 1969

    Default Passing a string into an Array

    I am trying to pass a string into an Array, but I break it.<BR><BR>strJan = 1<BR>strFeb = 2<BR>strMar = 3<BR>strApr = 4<BR>strMay = 5<BR>strJun = 6<BR>strJul = 7<BR>strAug = 8<BR>strSep = 9<BR>strOct = 10<BR>strNov = 11<BR>strDec = 12<BR><BR>ShowChart Array(strJan, strFeb, strMar, strApr, strMay, strJun, strJul, strAug, strSep, strOct, strNov, strDec), Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"), "Chart Title", "X Label", "Y Label"<BR><BR>Which now gets written out. But if I change the value of say strJan = 1 to strJan = JanTotals (where JanTotals = 1)then my array breaks.<BR><BR>I tried DIM (ing) strJan as INT and JanTotals as INT, but that still didn&#039;t seem to help. Any help would be greatly appreciated.<BR><BR>Respectfully,<BR><BR>Jason Buck<BR>

  2. #2
    Join Date
    Dec 1969

    Default Where do you change it?

    (And why is the title of that message "passing a string..." when the problem is passing a number???)<BR><BR>Anyway *where* do you change the code?<BR><BR>Maybe you need to show the actual code that isn&#039;t working?<BR><BR>Oh...and why do you label those variables strJan, strFeb, etc., when you *clearly* are using them to hold numbers instead of "str"ings???<BR><BR>If you&#039;re going to follow MS&#039;s silly Hungarian Notation rules, you should use the correct prefixes? Such as intJan or dblJan?<BR><BR><BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts