Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jan 10th, 2005, 1:00 AM   #1
loveperson88
Newbie
 
Join Date: Jan 2005
Posts: 3
Rep Power: 0 loveperson88 is on a distinguished road
MSFlexGrid

I no have idea how to reduce the coding by controlling the MSFlexGrid. The following is my coding.

Public Sub ResultToGrid(Flex As MSFlexGrid)
Select Case mux_count
'******************************* Unit 1 - 10 ***********************************
Case 0
'Channel 0
'Temperature 25C
With Flex
.Row = 2
.Col = 2
.Text = frmMain.lst25C.List(0)
.Col = 3
.Text = frmMain.lst25C1080.List(0)
.Col = 4
.Text = frmMain.lst25C790.List(0)
.Col = 5
.Text = frmMain.lst25C500.List(0)
'Temperature 70C
.Row = 2
.Col = 6
.Text = frmMain.lst70C.List(0)
.Col = 7
.Text = frmMain.lst70C1080.List(0)
.Col = 8
.Text = frmMain.lst70C500.List(0)
'Temperature -10C
.Row = 2
.Col = 9
.Text = frmMain.lst10C.List(0)
.Col = 10
.Text = frmMain.lst10C1080.List(0)
.Col = 11
.Text = frmMain.lst10C500.List(0)
End With
Case 1
'Channel 1
'Temperature 25C
With Flex
.Row = 3
.Col = 2
.Text = frmMain.lst25C.List(1)
.Col = 3
.Text = frmMain.lst25C1080.List(1)
.Col = 4
.Text = frmMain.lst25C790.List(1)
.Col = 5
.Text = frmMain.lst25C500.List(1)
'Temperature 70C
.Col = 6
.Text = frmMain.lst70C.List(1)
.Col = 7
.Text = frmMain.lst70C1080.List(1)
.Col = 8
.Text = frmMain.lst70C500.List(1)
'Temperature -10C
.Col = 9
.Text = frmMain.lst10C.List(1)
.Col = 10
.Text = frmMain.lst10C1080.List(1)
.Col = 11
.Text = frmMain.lst10C500.List(1)
End With
End Select
End Sub

Basically my mux_count is up to 80, I dun want use this code to control the MSFlexGrid, so any1 knw hw to reduce the code? Thanks......
loveperson88 is offline   Reply With Quote
Old Jan 29th, 2005, 10:08 AM   #2
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
Could you start by turning your lists into a control array and using a for loop... ?
Rory is offline   Reply With Quote
Old Jan 29th, 2005, 12:48 PM   #3
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
I sincerely doubt you're gonna get a response, mate - look at the post time and his/her post count.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:56 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC