Length of an Array

S

Sumit

Hi All,

I need to find length of a variable m_task_ids

Its globally declared as
Dim m_task_ids

It contain values like
m_task_ids(0) = "111"
m_task_ids(1) = "112"
m_task_ids(2) = "113"
m_task_ids(3) = "114"
m_task_ids(4) = ""


I need to find the length of this array so that i can assign a temp variable
such as nTaskIndex and use it in loop.

m_task_ids.Length and m_task_ids.Count is NOT WORKING for me.

Please help!!!
 
S

Steve Rindsberg

Hi All,

I need to find length of a variable m_task_ids

Its globally declared as
Dim m_task_ids

It contain values like
m_task_ids(0) = "111"
m_task_ids(1) = "112"
m_task_ids(2) = "113"
m_task_ids(3) = "114"
m_task_ids(4) = ""

I need to find the length of this array so that i can assign a temp variable
such as nTaskIndex and use it in loop.

m_task_ids.Length and m_task_ids.Count is NOT WORKING for me.

Dim x as long
For x = LBound(m_task_ids) to UBound(m_task_ids)
' Do your stuff
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top