Arrays have me confused

I'm trying to use a userform to collect a list of words (i.e., 20) to later 
diplay in a shape or textbox (as flash cards) in my presentation..  What's 
the best way to collect and store my list?  I know I could do something like 
word1 = userform1.textbox1.text, word2 = userform1.textbox2.text and so on 
but I thought an array would simplifiy things.  The only problem is I'm 
completely confused when it comes to using arrays.  Also, I guess since I'm 
here, how would I later retrieve my list for display in one textbox, one word 
at a time (e.g., click my word button and the first word appears and click my 
word button again and the second word appears).

Thanks so much!
-- 
Mike Mast
Special Education Preschool Teacher
0
Utf
4/8/2010 11:54:01 PM
powerpoint 2011 articles. 0 followers. Follow

10 Replies
740 Views

Similar Articles

[PageSpeed] 10

In article <1494401D-83B1-4C08-AE46-922CA05A6875@microsoft.com>, Preschool Mike 
wrote:
> I'm trying to use a userform to collect a list of words (i.e., 20) to later 
> diplay in a shape or textbox (as flash cards) in my presentation..  What's 
> the best way to collect and store my list?  I know I could do something like 
> word1 = userform1.textbox1.text, word2 = userform1.textbox2.text and so on 
> but I thought an array would simplifiy things.  The only problem is I'm 
> completely confused when it comes to using arrays.  Also, I guess since I'm 
> here, how would I later retrieve my list for display in one textbox, one word 
> at a time (e.g., click my word button and the first word appears and click my 
> word button again and the second word appears).

' AirCode
Dim arayWords(1 to 20) as String

arayWords(1)= userform1.textbox1.text
arayWords(2)= userform1.textbox2.text
' and so on

' Or you could give each of the text boxes a 
' predictable name, say MyText1, MyText2 and so on,
' then

Dim oCtl as Control
Dim x as long 
x = 1
For each oCtl in Userform1.Controls
    If Instr(oCtl.Name,"MyText") > 0 Then
        arayWords(x) = .Item(x).text
        x = x+1
    End If
Next

To display them, something like this:

Sub MyWord()
' would need to have arayWords declared as public
' at top of module
  Static WordIndex as Long
  ' reset the counter if we've used all the words
  If WordIndex > 20 then WordIndex = 1
  MsgBox arayWords(WordIndex)
  WordIndex = WordIndex + 1
End Sub

==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/


0
Steve
4/9/2010 1:26:15 AM
On Apr 9, 3:26=A0am, Steve Rindsberg <ab...@localhost.com> wrote:
> In article <1494401D-83B1-4C08-AE46-922CA05A6...@microsoft.com>, Preschoo=
l Mike
> wrote:
>
> > I'm trying to use a userform to collect a list of words (i.e., 20) to l=
ater
> > diplay in a shape or textbox (as flash cards) in my presentation.. =A0W=
hat's
> > the best way to collect and store my list? =A0I know I could do somethi=
ng like
> > word1 =3D userform1.textbox1.text, word2 =3D userform1.textbox2.text an=
d so on
> > but I thought an array would simplifiy things. =A0The only problem is I=
'm
> > completely confused when it comes to using arrays. =A0Also, I guess sin=
ce I'm
> > here, how would I later retrieve my list for display in one textbox, on=
e word
> > at a time (e.g., click my word button and the first word appears and cl=
ick my
> > word button again and the second word appears).
>
> ' AirCode
> Dim arayWords(1 to 20) as String
>
> arayWords(1)=3D userform1.textbox1.text
> arayWords(2)=3D userform1.textbox2.text
> ' and so on
>
> ' Or you could give each of the text boxes a
> ' predictable name, say MyText1, MyText2 and so on,
> ' then
>
> Dim oCtl as Control
> Dim x as long
> x =3D 1
> For each oCtl in Userform1.Controls
> =A0 =A0 If Instr(oCtl.Name,"MyText") > 0 Then
> =A0 =A0 =A0 =A0 arayWords(x) =3D .Item(x).text
> =A0 =A0 =A0 =A0 x =3D x+1
> =A0 =A0 End If
> Next
>
> To display them, something like this:
>
> Sub MyWord()
> ' would need to have arayWords declared as public
> ' at top of module
> =A0 Static WordIndex as Long
> =A0 ' reset the counter if we've used all the words
> =A0 If WordIndex > 20 then WordIndex =3D 1
> =A0 MsgBox arayWords(WordIndex)
> =A0 WordIndex =3D WordIndex + 1
> End Sub
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D
> PPT Frequently Asked Questionshttp://www.pptfaq.com/
>
> PPTools add-ins for PowerPointhttp://www.pptools.com/

Hi,
I am confused and curious: this seems very interresteing, but I do not
know how and where to use. Can anyone explain me more deeply, please?
Or show me an example?
Thank you!
Natasa
0
Tamutka
4/9/2010 5:50:17 AM
Mike,

I'm guessing you read the section in my book about arrays and are still 
confused so I'm not sure I can explain it any better, but I'll try.

You know what a variable is, a place to store one piece of information. 
An array is simply a bunch of numbered boxes to store multiple pieces of 
the same kind of information. For example if you want a bunch of words, 
you could use:

Dim myword1 As String
Dim myword2 As String
Dim myword3 As String
....

I do this a lot because it is easy to understand. However, you might 
want to simplify this by using an array. If you want an array with 20 
items, you would do

Dim myword(20) As String

The tricky part about this is that it gives you 20 items, numbered 0 
through 19:

myword(0), myword(1), myword(2), ..., myword(19)

Only a computer geek starts counting at 0 so this is confusing. Steve, 
in his example, uses the nice trick to tell the computer that he wants 
to start counting at 1:

Dim myword(1 To 20) As String

Now, you have:

myword(1), myword(2), myword(3), ..., myword(20)

This might confuse a computer geek, but it is much easier for the rest 
of us.

Now, once you have an array, you can pretend that you don't have an 
array and just access the elements of the array like you would a bunch 
of individual variables:

myword(1) = "mom"
myword(2) = "dad"
myword(3) = "cat"
....
myword(20) = "noodle"

That will work fine, but it defeats the purpose of having an array 
(except that you have only one simple Dim statement). The power of the 
array is that you can access different elements by number. This is great 
if you want to access one randomly (e.g., generate a random number 
between 1 and 20, put it in the variable myRandNum and then access 
myWord(myRandNum) ), or if you want to use a variable in any other way 
to decide which array element to access (perhaps, based on which button 
is pressed or which slide you are on). It is also great if you want to 
cycle through the elements of the array:

For i = 1 To 20
     MsgBox myWord(i)
Next i

This just displays each element of the array in succeeding message boxes.

Two other quick notes about arrays. Arrays can be multidimensional so 
you could, for example, use an array to represent a checkerboard, 
referring to rows and columns. But that gets a bit more complicated and 
is beyond what you want to know now. You also don't need to know in 
advance how many elements the array is going to have (possibly you want 
to define it based on user input). For that you can read the section of 
my book about ReDim.

I hope this makes it a little clearer, and I hope Steve's code does what 
you want.

--David

On 4/8/10 7:54 PM, Preschool Mike wrote:
> I'm trying to use a userform to collect a list of words (i.e., 20) to later
> diplay in a shape or textbox (as flash cards) in my presentation..  What's
> the best way to collect and store my list?  I know I could do something like
> word1 = userform1.textbox1.text, word2 = userform1.textbox2.text and so on
> but I thought an array would simplifiy things.  The only problem is I'm
> completely confused when it comes to using arrays.  Also, I guess since I'm
> here, how would I later retrieve my list for display in one textbox, one word
> at a time (e.g., click my word button and the first word appears and click my
> word button again and the second word appears).
>
> Thanks so much!


-- 
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
0
David
4/9/2010 2:23:01 PM
In article <3b2747dd-c66a-4135-aebb-
a1f4c84450e5@g30g2000yqc.googlegroups.com>, Tamutka wrote:
> On Apr 9, 3:26 am, Steve Rindsberg <ab...@localhost.com> wrote:
> > In article <1494401D-83B1-4C08-AE46-922CA05A6...@microsoft.com>, Preschoo
> l Mike
> > wrote:
> >
> > > I'm trying to use a userform to collect a list of words (i.e., 20) to l
> ater
> > > diplay in a shape or textbox (as flash cards) in my presentation..  W
> hat's
> > > the best way to collect and store my list?  I know I could do somethi
> ng like
> > > word1 = userform1.textbox1.text, word2 = userform1.textbox2.text an
> d so on
> > > but I thought an array would simplifiy things.  The only problem is I
> 'm
> > > completely confused when it comes to using arrays.  Also, I guess sin
> ce I'm
> > > here, how would I later retrieve my list for display in one textbox, on
> e word
> > > at a time (e.g., click my word button and the first word appears and cl
> ick my
> > > word button again and the second word appears).
> >
> > ' AirCode
> > Dim arayWords(1 to 20) as String
> >
> > arayWords(1)= userform1.textbox1.text
> > arayWords(2)= userform1.textbox2.text
> > ' and so on
> >
> > ' Or you could give each of the text boxes a
> > ' predictable name, say MyText1, MyText2 and so on,
> > ' then
> >
> > Dim oCtl as Control
> > Dim x as long
> > x = 1
> > For each oCtl in Userform1.Controls
> >     If Instr(oCtl.Name,"MyText") > 0 Then
> >         arayWords(x) = .Item(x).text
> >         x = x+1
> >     End If
> > Next
> >
> > To display them, something like this:
> >
> > Sub MyWord()
> > ' would need to have arayWords declared as public
> > ' at top of module
> >   Static WordIndex as Long
> >   ' reset the counter if we've used all the words
> >   If WordIndex > 20 then WordIndex = 1
> >   MsgBox arayWords(WordIndex)
> >   WordIndex = WordIndex + 1
> > End Sub
> >
> > ========================
> ======
> > PPT Frequently Asked Questionshttp://www.pptfaq.com/
> >
> > PPTools add-ins for PowerPointhttp://www.pptools.com/
> 
> Hi,
> I am confused and curious: this seems very interresteing, but I do not
> know how and where to use. Can anyone explain me more deeply, please?
> Or show me an example?

My understanding is that Mike wants to keep a list of words (entered in a 
dialog box/user form) and then each time a user clicks a button in PowerPoint 
during a presentation, to display one of those words.  

Putting the words into an array allows him to create and hold the list.
The code in MyWord shows how to retrieve the next word from the array (list 
of words).  In real life, he'd modify MyWord to do something other than 
simply display the word in a MsgBox.


==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/


0
Steve
4/9/2010 3:17:14 PM
Thanks Steve, I'll give this a try and let you know how it goes.  
-- 
Mike Mast
Special Education Preschool Teacher


"Steve Rindsberg" wrote:

> In article <1494401D-83B1-4C08-AE46-922CA05A6875@microsoft.com>, Preschool Mike 
> wrote:
> > I'm trying to use a userform to collect a list of words (i.e., 20) to later 
> > diplay in a shape or textbox (as flash cards) in my presentation..  What's 
> > the best way to collect and store my list?  I know I could do something like 
> > word1 = userform1.textbox1.text, word2 = userform1.textbox2.text and so on 
> > but I thought an array would simplifiy things.  The only problem is I'm 
> > completely confused when it comes to using arrays.  Also, I guess since I'm 
> > here, how would I later retrieve my list for display in one textbox, one word 
> > at a time (e.g., click my word button and the first word appears and click my 
> > word button again and the second word appears).
> 
> ' AirCode
> Dim arayWords(1 to 20) as String
> 
> arayWords(1)= userform1.textbox1.text
> arayWords(2)= userform1.textbox2.text
> ' and so on
> 
> ' Or you could give each of the text boxes a 
> ' predictable name, say MyText1, MyText2 and so on,
> ' then
> 
> Dim oCtl as Control
> Dim x as long 
> x = 1
> For each oCtl in Userform1.Controls
>     If Instr(oCtl.Name,"MyText") > 0 Then
>         arayWords(x) = .Item(x).text
>         x = x+1
>     End If
> Next
> 
> To display them, something like this:
> 
> Sub MyWord()
> ' would need to have arayWords declared as public
> ' at top of module
>   Static WordIndex as Long
>   ' reset the counter if we've used all the words
>   If WordIndex > 20 then WordIndex = 1
>   MsgBox arayWords(WordIndex)
>   WordIndex = WordIndex + 1
> End Sub
> 
> ==============================
> PPT Frequently Asked Questions
> http://www.pptfaq.com/
> 
> PPTools add-ins for PowerPoint
> http://www.pptools.com/
> 
> 
> .
> 
0
Utf
4/10/2010 12:46:01 AM
Thanks David for your patience and spelling that out for me.  I guess my 
confusion started with how do I get 20 text boxes from my userform to go into 
one array.  I get it if I would use something like an InputBox with a For 
Loop: (e.g., it keeps asking until all 20 have been entered).  I've read your 
book over and over and have started reading Microsoft Visual Basic 2005 as 
well as Joshn Walkenbach's, Excel 2007 Power Programming with VBA.  Actually 
I read Microsoft Visual Basic 2005  before I read yours.  I've found that 
after reading yours it has helped with understanding the others.  Yours is by 
far is an excellent place to start for anyone wanting to learn VB.
-- 
Mike Mast
Special Education Preschool Teacher


"David Marcovitz" wrote:

> Mike,
> 
> I'm guessing you read the section in my book about arrays and are still 
> confused so I'm not sure I can explain it any better, but I'll try.
> 
> You know what a variable is, a place to store one piece of information. 
> An array is simply a bunch of numbered boxes to store multiple pieces of 
> the same kind of information. For example if you want a bunch of words, 
> you could use:
> 
> Dim myword1 As String
> Dim myword2 As String
> Dim myword3 As String
> ....
> 
> I do this a lot because it is easy to understand. However, you might 
> want to simplify this by using an array. If you want an array with 20 
> items, you would do
> 
> Dim myword(20) As String
> 
> The tricky part about this is that it gives you 20 items, numbered 0 
> through 19:
> 
> myword(0), myword(1), myword(2), ..., myword(19)
> 
> Only a computer geek starts counting at 0 so this is confusing. Steve, 
> in his example, uses the nice trick to tell the computer that he wants 
> to start counting at 1:
> 
> Dim myword(1 To 20) As String
> 
> Now, you have:
> 
> myword(1), myword(2), myword(3), ..., myword(20)
> 
> This might confuse a computer geek, but it is much easier for the rest 
> of us.
> 
> Now, once you have an array, you can pretend that you don't have an 
> array and just access the elements of the array like you would a bunch 
> of individual variables:
> 
> myword(1) = "mom"
> myword(2) = "dad"
> myword(3) = "cat"
> ....
> myword(20) = "noodle"
> 
> That will work fine, but it defeats the purpose of having an array 
> (except that you have only one simple Dim statement). The power of the 
> array is that you can access different elements by number. This is great 
> if you want to access one randomly (e.g., generate a random number 
> between 1 and 20, put it in the variable myRandNum and then access 
> myWord(myRandNum) ), or if you want to use a variable in any other way 
> to decide which array element to access (perhaps, based on which button 
> is pressed or which slide you are on). It is also great if you want to 
> cycle through the elements of the array:
> 
> For i = 1 To 20
>      MsgBox myWord(i)
> Next i
> 
> This just displays each element of the array in succeeding message boxes.
> 
> Two other quick notes about arrays. Arrays can be multidimensional so 
> you could, for example, use an array to represent a checkerboard, 
> referring to rows and columns. But that gets a bit more complicated and 
> is beyond what you want to know now. You also don't need to know in 
> advance how many elements the array is going to have (possibly you want 
> to define it based on user input). For that you can read the section of 
> my book about ReDim.
> 
> I hope this makes it a little clearer, and I hope Steve's code does what 
> you want.
> 
> --David
> 
> On 4/8/10 7:54 PM, Preschool Mike wrote:
> > I'm trying to use a userform to collect a list of words (i.e., 20) to later
> > diplay in a shape or textbox (as flash cards) in my presentation..  What's
> > the best way to collect and store my list?  I know I could do something like
> > word1 = userform1.textbox1.text, word2 = userform1.textbox2.text and so on
> > but I thought an array would simplifiy things.  The only problem is I'm
> > completely confused when it comes to using arrays.  Also, I guess since I'm
> > here, how would I later retrieve my list for display in one textbox, one word
> > at a time (e.g., click my word button and the first word appears and click my
> > word button again and the second word appears).
> >
> > Thanks so much!
> 
> 
> -- 
> David M. Marcovitz
> Author of _Powerful PowerPoint for Educators_
> http://www.PowerfulPowerPoint.com/
> Microsoft PowerPoint MVP
> Associate Professor, Loyola University Maryland
> .
> 
0
Utf
4/10/2010 1:01:01 AM
Steve I'm having a problem with part of your code.  I get a message "Invalid 
or uqualified reference" to the    .Item(x).Text   part of the code.  Can you 
help me fix this?  

Thanks
-- 
Mike Mast
Special Education Preschool Teacher


"Steve Rindsberg" wrote:

> In article <3b2747dd-c66a-4135-aebb-
> a1f4c84450e5@g30g2000yqc.googlegroups.com>, Tamutka wrote:
> > On Apr 9, 3:26 am, Steve Rindsberg <ab...@localhost.com> wrote:
> > > In article <1494401D-83B1-4C08-AE46-922CA05A6...@microsoft.com>, Preschoo
> > l Mike
> > > wrote:
> > >
> > > > I'm trying to use a userform to collect a list of words (i.e., 20) to l
> > ater
> > > > diplay in a shape or textbox (as flash cards) in my presentation..  W
> > hat's
> > > > the best way to collect and store my list?  I know I could do somethi
> > ng like
> > > > word1 = userform1.textbox1.text, word2 = userform1.textbox2.text an
> > d so on
> > > > but I thought an array would simplifiy things.  The only problem is I
> > 'm
> > > > completely confused when it comes to using arrays.  Also, I guess sin
> > ce I'm
> > > > here, how would I later retrieve my list for display in one textbox, on
> > e word
> > > > at a time (e.g., click my word button and the first word appears and cl
> > ick my
> > > > word button again and the second word appears).
> > >
> > > ' AirCode
> > > Dim arayWords(1 to 20) as String
> > >
> > > arayWords(1)= userform1.textbox1.text
> > > arayWords(2)= userform1.textbox2.text
> > > ' and so on
> > >
> > > ' Or you could give each of the text boxes a
> > > ' predictable name, say MyText1, MyText2 and so on,
> > > ' then
> > >
> > > Dim oCtl as Control
> > > Dim x as long
> > > x = 1
> > > For each oCtl in Userform1.Controls
> > >     If Instr(oCtl.Name,"MyText") > 0 Then
> > >         arayWords(x) = .Item(x).text
> > >         x = x+1
> > >     End If
> > > Next
> > >
> > > To display them, something like this:
> > >
> > > Sub MyWord()
> > > ' would need to have arayWords declared as public
> > > ' at top of module
> > >   Static WordIndex as Long
> > >   ' reset the counter if we've used all the words
> > >   If WordIndex > 20 then WordIndex = 1
> > >   MsgBox arayWords(WordIndex)
> > >   WordIndex = WordIndex + 1
> > > End Sub
> > >
> > > ========================
> > ======
> > > PPT Frequently Asked Questionshttp://www.pptfaq.com/
> > >
> > > PPTools add-ins for PowerPointhttp://www.pptools.com/
> > 
> > Hi,
> > I am confused and curious: this seems very interresteing, but I do not
> > know how and where to use. Can anyone explain me more deeply, please?
> > Or show me an example?
> 
> My understanding is that Mike wants to keep a list of words (entered in a 
> dialog box/user form) and then each time a user clicks a button in PowerPoint 
> during a presentation, to display one of those words.  
> 
> Putting the words into an array allows him to create and hold the list.
> The code in MyWord shows how to retrieve the next word from the array (list 
> of words).  In real life, he'd modify MyWord to do something other than 
> simply display the word in a MsgBox.
> 
> 
> ==============================
> PPT Frequently Asked Questions
> http://www.pptfaq.com/
> 
> PPTools add-ins for PowerPoint
> http://www.pptools.com/
> 
> 
> .
> 
0
Utf
4/10/2010 12:45:01 PM
In article <A73E4B2A-1120-4078-ADE2-9B8DA147F364@microsoft.com>, Preschool Mike 
wrote:
> Steve I'm having a problem with part of your code.  I get a message "Invalid 
> or uqualified reference" to the    .Item(x).Text   part of the code.  Can you 
> help me fix this?  

Pesky aircode.   ;-)

This should go at the top of a module:
Option Explicit
Public arayWords(1 To 20) As String

This can be in your form:

Private Sub CommandButton1_Click()
' this loads the array with text from the userform
Dim oCtl As Control
Dim x As Long
x = 1
For Each oCtl In UserForm1.Controls
    If InStr(oCtl.Name, "MyText") > 0 Then
         arayWords(x) = oCtl.Text
         x = x + 1
     End If
 Next
End Sub

Private Sub CommandButton2_Click()
' This is to text MyWord
' I assigned this to another button click on the form
    Call MyWord
End Sub


 Sub MyWord()
 ' would need to have arayWords declared as public
 ' at top of module
   Static WordIndex As Long
   ' reset the counter if we've used all the words
   If WordIndex > 20 Then WordIndex = 1
   If WordIndex < 1 Then WordIndex = 1
   MsgBox arayWords(WordIndex)
   WordIndex = WordIndex + 1
 End Sub



==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/


0
Steve
4/10/2010 7:12:04 PM
That did the trick.  I like how you coded it to start over when it gets to 
the last word.  Thanks for your help!
-- 
Mike Mast
Special Education Preschool Teacher


"Steve Rindsberg" wrote:

> In article <A73E4B2A-1120-4078-ADE2-9B8DA147F364@microsoft.com>, Preschool Mike 
> wrote:
> > Steve I'm having a problem with part of your code.  I get a message "Invalid 
> > or uqualified reference" to the    .Item(x).Text   part of the code.  Can you 
> > help me fix this?  
> 
> Pesky aircode.   ;-)
> 
> This should go at the top of a module:
> Option Explicit
> Public arayWords(1 To 20) As String
> 
> This can be in your form:
> 
> Private Sub CommandButton1_Click()
> ' this loads the array with text from the userform
> Dim oCtl As Control
> Dim x As Long
> x = 1
> For Each oCtl In UserForm1.Controls
>     If InStr(oCtl.Name, "MyText") > 0 Then
>          arayWords(x) = oCtl.Text
>          x = x + 1
>      End If
>  Next
> End Sub
> 
> Private Sub CommandButton2_Click()
> ' This is to text MyWord
> ' I assigned this to another button click on the form
>     Call MyWord
> End Sub
> 
> 
>  Sub MyWord()
>  ' would need to have arayWords declared as public
>  ' at top of module
>    Static WordIndex As Long
>    ' reset the counter if we've used all the words
>    If WordIndex > 20 Then WordIndex = 1
>    If WordIndex < 1 Then WordIndex = 1
>    MsgBox arayWords(WordIndex)
>    WordIndex = WordIndex + 1
>  End Sub
> 
> 
> 
> ==============================
> PPT Frequently Asked Questions
> http://www.pptfaq.com/
> 
> PPTools add-ins for PowerPoint
> http://www.pptools.com/
> 
> 
> .
> 
0
Utf
4/11/2010 8:26:01 PM
In article <0AADC0DC-A27A-41B5-9648-F52C73793CCA@microsoft.com>, Preschool 
Mike wrote:
> That did the trick.  I like how you coded it to start over when it gets to 
> the last word.  Thanks for your help!

<g> Ya gotta give the poor dear somewhere to go, else it barfs in your users' 
laps.  They HATE that.  

==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/


0
Steve
4/12/2010 7:44:45 PM
Reply:

Similar Artilces:

"Array Index Out of Bounds"
I recently purchased "Office Professional Ed 2003." With it came "Business Contact Manager." When I double click to open a particular contact or business contact, I get the above "subject" message. Is there a reason, fix, or solution for this? Thanks, John ...

Windows Contacts / Windows Live Contacts confusion
Sorry I know that this has probably been treated often but it confuses me however. Only a few days ago i have been forced to switch to Windows Live Mail, after having used Windows Mail in Windows7 for a while (there is a way of importing windows Mail into Windows7). I now have two different contact systems. 1. the c:\users\MyName\Contacts folder (in my German version this is called "Kontakte") 2. The Windows Live Mail contact system that integrates directly into Windows Live Mail. It seems that these two do not synchronize and can someone tell me which in ...

additem to combobox with an array
hi, i'm trying to add itemns to an multicolumn combobox (3 columns) using an array. if i just try to add 1 column there is no problems, but when i try t add more columns to the combobox it wont work anymore. tips anyone? tia jock -- jock ----------------------------------------------------------------------- jocke's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=76 View this thread: http://www.excelforum.com/showthread.php?threadid=47167 Did you change the .columncount property? I made a small userform and picked up some values off a worksheet to create...

Array+Array
Hi, I have 2 (or more) arrays, how can i combine them into 1? example: Array 1 = "1, 2, 3, 4" Array 2 = "A, B, C, D, E, F" Result: Array_Combined = "1, 2, 3, 4, A, B, C, D, E, F" br, Danny On Jan 7, 9:23=A0am, Danny <dannypct...@gmail.com> wrote: > Hi, > > I have 2 (or more) arrays, how can i combine them into 1? > > example: > Array 1 =3D "1, 2, 3, 4" > Array 2 =3D "A, B, C, D, E, F" > > Result: > Array_Combined =3D "1, 2, 3, 4, A, B, C, D, E, F" > > br, >...

array
Dear programmer I don't understand the array can any one give very easy example to understand the types of array ( I can use command button and text box) Example 'Don't forget to write notes for me ' the next line will define the array. Dim a(2) As String ' the next lines define the data of array a(0) = "1" a(1) = "2" a(2) = "3" And so on Notes: The array is very difficult please give me easy example "a" <A@a.com> wrote in message news:uy9smdVUIHA.4476@TK2MSFTNGP06.phx.gbl... > Dear programmer I don't understa...

how do I create an array
I have a column of values that look like: 00000000007310F0000 all cells are 19 chars in length, and the 15th char is alpha. I need to map the 15th alpha char to a numeric. the mapping is as follows: ABCDEFGHI (column F) 123456789 (column G) this is where I'm at: =REPLACE(C3,15,1,(IF(MID(C3,15,1)=({F3:F12}),({G3:G11}),""))) please help ...

Account Framework, Account Format, & Default COA
Someone please tell me if I have this straight. When you first install GP, there is a default account framework which is set to max length of 66 with max segments of 9. Which means you can have up to 9 segments divvied up any way you wish as long as the total of all segments does not exceed 66 characters. Correct? And for which there is really no need to change this. Correct? Now, when you setup a company you can setup your account format any way you want as long as it =93fits within=94 the account framework. So, if you leave the account framework set to the defaults you can set...

Array saving question (lbound)
Hello! I am saving an array to a file and then load it again. Open sPath For Binary As #iFile1 If uLoad Then Get #iFile1, , uArray Else Put #iFile1, , uArray End If My array looks like this: Redim myArr(1 to 3) as long myArr(1) = 100 myArr(2) = 500 myArr(3) = 10000 When I load it again, I say: Redim MyNewArr(1 to 3) and call the above sub. For some reason, MyNewArr now looks like this: MyNewArr(0) = 100 MyNewArr(1) = 500 MyNewArr(2) = 3 When I try to access MyNewArr(3) an out of bounds error is thrown. Can somebo...

Accessing the CCD array of the camera using MFC
Hello, I am capturing the images from the camera using VC++ MFC . And each image is of size 1280*1024. When I want to do processing over certain area, actually I want to divide the Image height(1024) into 4 blocks (256,256,256,256) keeping the width (1280) constant. So that I will get the whole image into 4 small images. Can anyone please kindly tell me How can I able to do this ? I am thinking of accessing CCD array, If accessing CCD array is a solution for this.. Please help Thanks in advance James First, you need to have a device driver that connects to the camera. This is not an MFC ...

Identify occurence in "array" which meets condition(s)
Example Scenario: where my formula tests whether the value in column A equals a multiple of 5. The result is displayed in column B. Call No. Meet Formula? 1 2 3 4 5 Y 6 7 8 9 10 Y Total 2 So, from the list above, I know that the 5th and 10th call will meet the formula. Problem: My formula is a lot more complicated than just checking for multiples of 5 and I have to run the formula per row (it will be a v long explanation if you wanna know why). Is there a way such that I just enter "20" in one cell and the formula gives me a result of "5, 10, 15, 20" (us...

array/list
I have defined an CObarray class called CReference, which I've made serialisable. I'd like CReference to contain a list type varailble that contains a list of strings, So I thought I'd use the CStringList class. Thus my CReference looks like class CReference : public CObject { DECLARE_SERIAL(CReference) public: CStringList notesrefs; CStringList notesresources; CString title; ...... ...... } and my serialise looks like void CReference::Serialize(CArchive &ar) { CObject::Serialize(ar); if (ar.IsStoring()) { ar << notesrefs << notesresources << titl...

To Array or not to Array...
....That is the question! Is there a difference (in terms of processing speed, efficiency, etc.) between using the non-array SUMPRODUCT formula or using the SUM array formula? When used on a large scale, is one faster - or better in some way - than the other? thanks. Hi "" In my limited experience I find that on large worksheets, array formulas are far more processing greedy than SUMPRODUCT and hence take longer. I tend to prefer arrays though! And i find more user friendly with nested IFs (with SUM/COUNT etc) Mathew "hmm" <hmm@hmm.com> wrote in message news:3FE...

array formula in vba
Hi! I have a worksheet in which I have a following array formula entered in Q1:Q1000 ={IF(MAX(IF($B$1:$B$1000=B2;$P$2:$P$1000))<30;0;1)} I would like to write a macro that would enter such formula into Q1:Q1000, the problem that I can't solve is the number of rows that is changing, sometimes I have 1000 rows, sometimes more. How to adjust the formula under vba to consider the number of rows? TIA Maciek Your formula looks kind of weird. You started in B1 in one portion and P2 in another. And you wanted to put the formula in Q1:Q###. I'm gonna guess that you really meant to st...

Array
Hello from steved I would like to insert a row but I get a message you cannot change part of an array How do I acheive inserting a row Thankyou. Remove your array formula(s) that intersect the rows you're moving. In article <3dcc01c42a70$53d92520$a501280a@phx.gbl>, "Steved" <anonymous@discussions.microsoft.com> wrote: > Hello from steved > > I would like to insert a row but I get a message > you cannot change part of an array > How do I acheive inserting a row > > Thankyou. Thankyou. >-----Original Message----- >Remove your array fo...

problem with array of derived class
Could I get a hand with trying to build a particular array? I have a base class CActRectangle, and classes such as CActSquare derived from CActRectangle. The variable int m_nType is used to identify the class, e.g., ART_SQUARE, and so on for other derivatives. When I try the following: CArray <CActRectangle*,CActRectangle*> ActRectangleArray; CArray <CActSquare *,CActSquare *> ActSquareArray; ActRectangleArray m_Rectangles; ActSquareArray m_Squares; . . . m_Rectangles.Add(new CActSquare()); . . . for(int i = 0; i < m_Rectangles.GetSize(); i++) if(m_Rectangles[i]->m_nT...

Column to Array
I have spent HOURS on this... Very simple, all I need to do is convert a column of about 1600 items to an array 12 items wide. Help??? doneagle@gmail.com wrote... .... >Very simple, all I need to do is convert a column of about 1600 items >to an array 12 items wide. 1600 isn't divisible by 12. I'll assume there are 1608 items. I'll assume your column of data is named D. For what purpose? If you just want to fill another range that spans 12 columns by 134 rows (I'll use G1:R134). If you want to go across then down, use G1: =INDEX(D,1) H1: =INDEX(D,COUNTA($G1:G1,1)) ...

Swap up Two Tchar Array Variables
Hi, I wanted to swap the TCHAR str1[10], TCHAR str2[10] arrays. Is there any API for that. I searched , but i didn't get in MSDN. I don't think there is one. How about this void Swap(TCHAR *pStr1,int Len1,TCHAR *pStr2,int Len2) { TCHAR *pTemp = new TCHAR[strlen(pStr1)+1]; strcpy(pTemp,pStr1); strncpy(pStr1,pStr2,Len1); strncpy(pStr2,pTemp,Len2); } AliR. "lucky" <Laxmanmaruthy@gmail.com> wrote in message news:1170055374.692932.314370@v33g2000cwv.googlegroups.com... > Hi, > > I wanted to swap the TCHAR str1[10], TCHAR str2[10] arrays. > Is...

Array #3
I have a spreadsheet of various types of expenditure, for example: Date in column A Column B Visa chq cash DD Visa cash chq chq etc with the values in column C I am trying to use sumif to have subtotals of the different types of expenditure. I'm missing something obvious............. well it is Friday pm thanks -- tghcogo ------------------------------------------------------------------------ tghcogo's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=10494 View this thread: http://www.excelforum.com/showthread.php?threadid=484260 =SUMPRODUCT(--(B...

x-y scatter graph and confused
I am using Excel 2007. I am trying to do a combination bar graph/ x-y scatter graph. I have headings and data for date, last year sales, and this years sales. Dates are formatted as 03/04/08 and sales are formatted for numbers to 1 decimal place. Everything plots fine and "last years sales" are represented by the column bar graph. I have changed "this years sales" to a x-y scatter graph (lines connected to the dots). That combination plots fine. On the x-y graph, I changed the secondary axis to primary axis. I then save the workbook. When I open the workbook, the graph h...

Array
In Excel can any one tell me how i change the size of an Array, it is set at 1E to E22, i would like to expand this to make it larger ie: 1G to say G99 ?? Hi Dad7 Look n the VBA help for resize -- Regards Ron de Bruin http://www.rondebruin.nl "Dad7" <Dad7@discussions.microsoft.com> wrote in message news:CCFF265A-BB76-4FBC-8E80-3110F05F21F3@microsoft.com... > In Excel can any one tell me how i change the size of an Array, it is set at > 1E to E22, i would like to expand this to make it larger ie: 1G to say G99 ?? Dad7 wrote: > In Excel can any one tell me ho...

Recalculate edited Arrays
2003 on XP. I have a large range that is full of arrays, the formula works well but when I need to expand the range to cover the new year, I find/replace the specific cell for the new year, but then how can I recalculate all the cells in one go instead of editing and Ctrl+Shft+Return each cell individually? Many thanks DeanH Please ignore previous question, all sorted, age-onset-moment. Sorry. Have a nice day. "DeanH" wrote: > 2003 on XP. > I have a large range that is full of arrays, the formula works well but when > I need to expand the range to cover the new year, ...

Creating an array
Hello, I am new to the forums. I have been learning Powershell in my spare time and it has been challenging to say the least. I have hit a small snag. I have written a script that will search a directory and all sub-directories contained within for .txt files. Once the .txt files have been found the script looks at the contents of the .txt files for a certain string. If the string is found within the .txt file it is copied to another directory. What I would like to do is create an array which contains all of the copied .txt files. I would like the contents of the array to b...

building array
I am trying to build a dynamic array. Sadly, I can't seem to see my error. I have iStartWkCol = 2 iEndWkCol = 74 iNoWks = iEndWkCol - iStartWkCol + 1 ReDim Preserve aNewDbData(1, iNoWks) As Variant 'Resize our array to accomodate the data For iCounter = iStartWkCol To iEndWkCol 'Loop through the Week Cols of the Worksheet iarrPosn = iCounter - iStartWkCol aNewDbData(0, iarrPosn) = _ Range(CLetter(iCounter) & "2").Value 'Date aNewDbData(1, iarrPosn)...

How to convert char array into wchar array?
hi: is there a function to conver array of chars into array of WCHARs? Thanks Polaris wbstowcs "Polaris" <etpolaris@hotmail.com> wrote in message news:egIdFTsPEHA.3216@TK2MSFTNGP12.phx.gbl... > hi: > > is there a function to conver array of chars into array of WCHARs? > > Thanks > Polaris > > >>is there a function to conver array of chars into array of WCHARs? I use MultiByteToWideChar() Keith ...

Forefront
Been tasked with "installing forefront" on our exchange 2007 servers. i'm confused between two product names: - Microsoft Forefront Protection 2010 for Exchange Server - Forefront Security for Exchange server. What is the difference or is the first name just the latest iteration of the same software? Thanks for any pointers. Lynne.Seamans@millersville.edu On Mon, 15 Mar 2010 15:11:08 -0400, "Lynne Seamans" <Lynne.Seamans@millersville.edu> wrote: >Been tasked with "installing forefront" on our exchange 2007 servers. &g...