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: 11
Default Msflexgrid Coldata

Hi All,
I am using MSFlexgrid control in one of my userform of Excel.
I want to get data of a particular column (e.g. Column # 2) and store it in
an array. Is there any simple way of doing it instead of using loop (for,
while)?
Currently I am doing following way:

Dim tempdata()
Redim tempdata (msflexgrid1.rows)

for i = 0 to msflexgrid1.rows-1
tempdata(i) = msflexgrid1.textmatrix(i,1)
next i

But if I try to do the same with following code then it gives error.
Dim tempdata()
tempdata = msflexgrid1.coldata(1)

This gives a compile error! Could you please guide me for this?

Second-
Using for loop method, I am able to write complete data to the array but
while doing following
Range(clmname & temprow).Resize(UBound(tempdata), 1).Value = tempdata
It only writes the first data!
Could you help me for this?

Regards,
Vishal.
 
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
MSFlexgrid in Excel epkjoha[_2_] Excel Programming 1 May 24th 06 09:59 PM
MSFlexGrid Delete Row gti_jobert[_91_] Excel Programming 0 April 26th 06 10:47 AM
MSFlexGrid Jake[_10_] Excel Programming 2 January 19th 05 12:54 AM
paint row in MSFlexGrid sirron Excel Programming 0 October 6th 03 08:18 PM
MSflexgrid data sirron Excel Programming 1 September 19th 03 09:29 PM


All times are GMT +1. The time now is 09:38 AM.

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"