Textbox2.Value (Type mismatch)

AndrewMB

Board Regular
Joined
Feb 3, 2008
Messages
75
Any ideas as to why this error occurs?



Private Sub CommandButton1_Click()

If ComboBox1.Value = "Plate" Then
Range("Date_Drop") = ComboBox2.Value
Range("Var_Drop") = ComboBox3.Value

If ComboBox3.Value = 2 Then
Range("V_Drop_One") = "=VLOOKUP(Date_Drop,C7:BN5000,2)"
TextBox2.Value = Range("V_Drop_One") - This line errors out. (Could not set the value property. Type mismatch.)


 
Let's day, based on your, data that the combobox is populated with values trom the range C7:C34.

If the user selects 28/04/2011 10:28 in the combobox which is the 11th item (I think) the ListIndex will be 10.

So to get the row, 17, we just add 7.

Now that you have that you can get values
from the other columns in that row.

Here's a rough example.

Code:
If Combobox1.ListIndex<>-1 Then 
     lngRow=Combobox1.ListIndex+7
    Textbox1.Value = Range("B"&lngRow).Value
End If

Something similar could be done to get the column.

That's assuming the other combobox has the values from across the top.

It would also depend how that combobox has been populated.
 
Last edited:
Upvote 0

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Ha ha, love it.

Perfect, does exactly as you said and saved me approximately 6.876 million lines of inefficient and pointless code.


Take yourself 10 full points.


:beerchug:
 
Upvote 0
OK, I have it working as I wanted for plate. So to reiterate, the user selects either plate or profile. If plate is selected, combobox2 is populated with dates from the plate tracker, and if profile is selected dates are listed from the profile tracker.

Similarly with combobox3, if plate, the material thickness's are listed, if profile, the profile part numbers are listed.

The code works for all plate thickness's and dates, but I now want to role out the same code for the profiles too. There are more profile part numbers to add to the code, but I have added the first one to show you the code.

Plate is working, but if I select profile, the textbox's do not return any values at all.



Private Sub CommandButton1_Click()

Application.ScreenUpdating = False

If ComboBox1.Value = "Plate" Then
Sheets("Plate Tracker").Select
If ComboBox3.Value = 2 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("D" & lngRow).Value
TextBox1.Value = Range("T" & lngRow).Value
TextBox3.Value = Range("AJ" & lngRow).Value
TextBox4.Value = Range("AZ" & lngRow).Value
End If
End If

If ComboBox3.Value = 3 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("E" & lngRow).Value
TextBox1.Value = Range("U" & lngRow).Value
TextBox3.Value = Range("AK" & lngRow).Value
TextBox4.Value = Range("BA" & lngRow).Value
End If
End If

If ComboBox3.Value = 4 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("F" & lngRow).Value
TextBox1.Value = Range("V" & lngRow).Value
TextBox3.Value = Range("AL" & lngRow).Value
TextBox4.Value = Range("BB" & lngRow).Value
End If
End If

If ComboBox3.Value = 5 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("G" & lngRow).Value
TextBox1.Value = Range("X" & lngRow).Value
TextBox3.Value = Range("AM" & lngRow).Value
TextBox4.Value = Range("BC" & lngRow).Value
End If
End If

If ComboBox3.Value = 6 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("H" & lngRow).Value
TextBox1.Value = Range("Y" & lngRow).Value
TextBox3.Value = Range("AN" & lngRow).Value
TextBox4.Value = Range("BD" & lngRow).Value
End If
End If

If ComboBox3.Value = 8 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("I" & lngRow).Value
TextBox1.Value = Range("Z" & lngRow).Value
TextBox3.Value = Range("AO" & lngRow).Value
TextBox4.Value = Range("BE" & lngRow).Value
End If
End If

If ComboBox3.Value = 10 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("J" & lngRow).Value
TextBox1.Value = Range("AB" & lngRow).Value
TextBox3.Value = Range("AP" & lngRow).Value
TextBox4.Value = Range("BF" & lngRow).Value
End If
End If

If ComboBox3.Value = 12 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("K" & lngRow).Value
TextBox1.Value = Range("AC" & lngRow).Value
TextBox3.Value = Range("AQ" & lngRow).Value
TextBox4.Value = Range("BG" & lngRow).Value
End If
End If

If ComboBox3.Value = 15 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("L" & lngRow).Value
TextBox1.Value = Range("AD" & lngRow).Value
TextBox3.Value = Range("AR" & lngRow).Value
TextBox4.Value = Range("BH" & lngRow).Value
End If
End If

If ComboBox3.Value = 20 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("M" & lngRow).Value
TextBox1.Value = Range("AE" & lngRow).Value
TextBox3.Value = Range("AS" & lngRow).Value
TextBox4.Value = Range("BI" & lngRow).Value
End If
End If

If ComboBox3.Value = 25 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("N" & lngRow).Value
TextBox1.Value = Range("AF" & lngRow).Value
TextBox3.Value = Range("AT" & lngRow).Value
TextBox4.Value = Range("BJ" & lngRow).Value
End If
End If

If ComboBox3.Value = 30 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("O" & lngRow).Value
TextBox1.Value = Range("AG" & lngRow).Value
TextBox3.Value = Range("AU" & lngRow).Value
TextBox4.Value = Range("BK" & lngRow).Value
End If
End If

If ComboBox3.Value = 35 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("P" & lngRow).Value
TextBox1.Value = Range("AH" & lngRow).Value
TextBox3.Value = Range("AV" & lngRow).Value
TextBox4.Value = Range("BL" & lngRow).Value
End If
End If

If ComboBox3.Value = 40 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("Q" & lngRow).Value
TextBox1.Value = Range("AI" & lngRow).Value
TextBox3.Value = Range("AW" & lngRow).Value
TextBox4.Value = Range("BM" & lngRow).Value
End If
End If

If ComboBox3.Value = 60 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("R" & lngRow).Value
TextBox1.Value = Range("AJ" & lngRow).Value
TextBox3.Value = Range("AX" & lngRow).Value
TextBox4.Value = Range("BN" & lngRow).Value
End If
End If



If ComboBox1.Value = "Profile" Then
Sheets("Profile Tracker").Select
If ComboBox3.Value = "300-8470" Then
If ComboBox2.ListIndex <> -1 Then
lngRow_pro = ComboBox2.ListIndex + 7
TextBox2.Value = Range("D" & lngRow_pro).Value
TextBox1.Value = Range("M" & lngRow_pro).Value
TextBox3.Value = Range("V" & lngRow_pro).Value
TextBox4.Value = Range("AE" & lngRow_pro).Value
End If
End If

End If


End If



Sheets("User Interface").Select
Range("C35").Select
Application.ScreenUpdating = True
 
Upvote 0
Sorry,I but I really don't understand what you want to do with that code.

Did you post sample data for this?

Try stepping through it with F8 and see what's actually happening.

I would suggest you look at the If statements and also check what, if anything, is being returned by all the range references.

Also is all that just for one value?
 
Upvote 0
The 'If' statements although many need to be in two seperate groups, 'if' statements for the plate option and if statements for the profile option.

So if they choose Plate, then select a date and a thickness, your code (which works fine) returns the intersecting value, which is the stock amount on that date in that thickness.

But if the user chooses profile, and not plate, the same code needs to work on the profile sheet the same as it does on the plate tracker.

The code I copied below hasnt copied over showing how the if statements are nested so I'll try and explain a little....

This is the userform, they select palte or profile, date and thickness. Then the 4 text boxes return the values that your code finds.

And for all of the plate thickness's it works. But if the user selects profile, nothing is returned.

ScreenShot00030-1.jpg



Private Sub CommandButton1_Click()

Application.ScreenUpdating = False

If ComboBox1.Value = "Plate" Then (When the OK button is pressed the user had two options to select from Plate or Profile. So combobox1.value can be either Plate or Profile. So there are IF statments for the plate option, but then there needs to be IF statements for the profile option.
Sheets("Plate Tracker").Select

If ComboBox3.Value = 2 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("D" & lngRow).Value
TextBox1.Value = Range("T" & lngRow).Value
TextBox3.Value = Range("AJ" & lngRow).Value
TextBox4.Value = Range("AZ" & lngRow).Value
End If
End If

If ComboBox3.Value = 3 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("E" & lngRow).Value
TextBox1.Value = Range("U" & lngRow).Value
TextBox3.Value = Range("AK" & lngRow).Value
TextBox4.Value = Range("BA" & lngRow).Value
End If
End If

If ComboBox3.Value = 4 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("F" & lngRow).Value
TextBox1.Value = Range("V" & lngRow).Value
TextBox3.Value = Range("AL" & lngRow).Value
TextBox4.Value = Range("BB" & lngRow).Value
End If
End If

If ComboBox3.Value = 5 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("G" & lngRow).Value
TextBox1.Value = Range("X" & lngRow).Value
TextBox3.Value = Range("AM" & lngRow).Value
TextBox4.Value = Range("BC" & lngRow).Value
End If
End If

If ComboBox3.Value = 6 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("H" & lngRow).Value
TextBox1.Value = Range("Y" & lngRow).Value
TextBox3.Value = Range("AN" & lngRow).Value
TextBox4.Value = Range("BD" & lngRow).Value
End If
End If

If ComboBox3.Value = 8 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("I" & lngRow).Value
TextBox1.Value = Range("Z" & lngRow).Value
TextBox3.Value = Range("AO" & lngRow).Value
TextBox4.Value = Range("BE" & lngRow).Value
End If
End If

If ComboBox3.Value = 10 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("J" & lngRow).Value
TextBox1.Value = Range("AB" & lngRow).Value
TextBox3.Value = Range("AP" & lngRow).Value
TextBox4.Value = Range("BF" & lngRow).Value
End If
End If

If ComboBox3.Value = 12 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("K" & lngRow).Value
TextBox1.Value = Range("AC" & lngRow).Value
TextBox3.Value = Range("AQ" & lngRow).Value
TextBox4.Value = Range("BG" & lngRow).Value
End If
End If

If ComboBox3.Value = 15 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("L" & lngRow).Value
TextBox1.Value = Range("AD" & lngRow).Value
TextBox3.Value = Range("AR" & lngRow).Value
TextBox4.Value = Range("BH" & lngRow).Value
End If
End If

If ComboBox3.Value = 20 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("M" & lngRow).Value
TextBox1.Value = Range("AE" & lngRow).Value
TextBox3.Value = Range("AS" & lngRow).Value
TextBox4.Value = Range("BI" & lngRow).Value
End If
End If

If ComboBox3.Value = 25 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("N" & lngRow).Value
TextBox1.Value = Range("AF" & lngRow).Value
TextBox3.Value = Range("AT" & lngRow).Value
TextBox4.Value = Range("BJ" & lngRow).Value
End If
End If

If ComboBox3.Value = 30 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("O" & lngRow).Value
TextBox1.Value = Range("AG" & lngRow).Value
TextBox3.Value = Range("AU" & lngRow).Value
TextBox4.Value = Range("BK" & lngRow).Value
End If
End If

If ComboBox3.Value = 35 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("P" & lngRow).Value
TextBox1.Value = Range("AH" & lngRow).Value
TextBox3.Value = Range("AV" & lngRow).Value
TextBox4.Value = Range("BL" & lngRow).Value
End If
End If

If ComboBox3.Value = 40 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("Q" & lngRow).Value
TextBox1.Value = Range("AI" & lngRow).Value
TextBox3.Value = Range("AW" & lngRow).Value
TextBox4.Value = Range("BM" & lngRow).Value
End If
End If

If ComboBox3.Value = 60 Then
If ComboBox2.ListIndex <> -1 Then
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("R" & lngRow).Value
TextBox1.Value = Range("AJ" & lngRow).Value
TextBox3.Value = Range("AX" & lngRow).Value
TextBox4.Value = Range("BN" & lngRow).Value
End If
End If

(This is the end of the IF statements for the plate option, and again all the code above works as it should.)

If ComboBox1.Value = "Profile" Then
Sheets("Profile Tracker").Select

If ComboBox3.Value = "300-8470" Then
If ComboBox2.ListIndex <> -1 Then
lngRow_pro = ComboBox2.ListIndex + 7
TextBox2.Value = Range("D" & lngRow_pro).Value
TextBox1.Value = Range("M" & lngRow_pro).Value
TextBox3.Value = Range("V" & lngRow_pro).Value
TextBox4.Value = Range("AE" & lngRow_pro).Value
End If
End If
End If


End If



Sheets("User Interface").Select
Range("C35").Select
Application.ScreenUpdating = True
 
Upvote 0
I still don't follow, but I know you don't need all those if statements.

It looks to me that what you have is far more suited to a Select Case structure.

If you want to post the code indented then you can use code tags - see the link in my signature.

Have you tried my suggestion of stepping through the code?

One thing I forgot to say was that you don't appear to have worksheet references for the ranges you are trying to get values from.

Without a worksheet reference VBA will assume they refer to what it regards as the active sheet.

By the way, when 'Plate' is selected do the columns move one to the right depending on the value picked.

eg D->E->F..., T->U->V..., AJ->AL->AL..., AZ->BA->BB...

and are these the values in combobox3 - 2,3,4,5,6,8,10...60?

The listindexes for those values are 0,1,2,3... which is the same as the column offset from D, T, AJ, AZ.
 
Upvote 0
Firstly, at the start of the code Sheets("Plate Tracker").select makes the plate data the active sheet, not needing to use sheet references.

The reason for so many IF statments...

If ComboBox1.Value = "Plate" Then (This can be either Plate or Profile)
Sheets("Plate Tracker").Select (Plate option selected, 'Plate Tracker' is now the active sheet and not 'Profile Tracker')
If ComboBox3.Value = 2 Then (This is material thickness of which there are others, which is what the other IF statements are for ie. 2,3,4,5,6,8,10,12,15,20,25,30,35,40 & 60mm)
If ComboBox2.ListIndex <> -1 Then (So at this point, Plate has been selected, a date and a thickness of 2mm)
lngRow = ComboBox2.ListIndex + 7
TextBox2.Value = Range("D" & lngRow).Value (This is the stock value)
TextBox1.Value = Range("T" & lngRow).Value (This is the order quantity value)
TextBox3.Value = Range("AJ" & lngRow).Value (This is the plate delivered quantity)
TextBox4.Value = Range("AZ" & lngRow).Value (This is the plate used quantity)
End If
End If

The code works for Plate. Its only when I start to try and add the Profile IF statements that nothing is returned.

Regarding the Range values being returned, ie. D, T, AJ & AZ. See the sheet below. There is a set of cells relating to stock values across all thickness. 2mm stock value is in Col D. 3mm would be Col E. All the wy up to 60mm in Col R.

Then for Order quantity, a new set of cells stating order value across all thickness's. That range is from T to AH. Profile delivered has it's own set of cells, as does Plate used.

I will stress that the code you gave me, using ListIndex is working. The userform returns all values in each textbox for all thickness's of plate.

OK, I did the F8 step through, and can see why nothing is being returned for the Profile option. I had the End if towards the bottom of the code in the wrong place. When the line If ComboBox1.Value = "Plate" Then... wasn't TRUE (because Profile was selected) the code was jumping right to the end of the code. The line If ComboBox1.Value = "Profile" Then... wasn't even being read.

I moved the End if line at the bottom of the code upwards in between the plate IF's and the profile IF's and its now working.

Sorry to drag this out, clearly my code is an inefficient way of doing it and it's taken me forever to explain it to you and still not doing a good job of it.

I just wanted to try and explain what fixed it.




Plate Tracker


<TABLE style="BACKGROUND-COLOR: #ffffff; PADDING-LEFT: 2pt; PADDING-RIGHT: 2pt; FONT-FAMILY: Arial,Arial; FONT-SIZE: 10pt" border=1 cellSpacing=0 cellPadding=0><COLGROUP><COL style="WIDTH: 30px; FONT-WEIGHT: bold"><COL style="WIDTH: 8px"><COL style="WIDTH: 93px"><COL style="WIDTH: 36px"><COL style="WIDTH: 36px"><COL style="WIDTH: 36px"><COL style="WIDTH: 36px"><COL style="WIDTH: 36px"><COL style="WIDTH: 36px"><COL style="WIDTH: 36px"><COL style="WIDTH: 36px"><COL style="WIDTH: 36px"><COL style="WIDTH: 36px"><COL style="WIDTH: 36px"><COL style="WIDTH: 36px"><COL style="WIDTH: 36px"><COL style="WIDTH: 36px"><COL style="WIDTH: 36px"></COLGROUP><TBODY><TR style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt; FONT-WEIGHT: bold"><TD></TD><TD>B</TD><TD>C</TD><TD>D</TD><TD>E</TD><TD>F</TD><TD>G</TD><TD>H</TD><TD>I</TD><TD>J</TD><TD>K</TD><TD>L</TD><TD>M</TD><TD>N</TD><TD>O</TD><TD>P</TD><TD>Q</TD><TD>R</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">1</TD><TD style="COLOR: #333399; FONT-SIZE: 16pt; FONT-WEIGHT: bold"></TD><TD style="COLOR: #333399; FONT-SIZE: 16pt; FONT-WEIGHT: bold"></TD><TD style="TEXT-ALIGN: left; COLOR: #333399; FONT-SIZE: 16pt; FONT-WEIGHT: bold; TEXT-DECORATION: underline" rowSpan=3 colSpan=5>Stock</TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">2</TD><TD style="COLOR: #333399; FONT-SIZE: 16pt; FONT-WEIGHT: bold"></TD><TD style="COLOR: #333399; FONT-SIZE: 16pt; FONT-WEIGHT: bold"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">3</TD><TD style="COLOR: #333399; FONT-SIZE: 16pt; FONT-WEIGHT: bold"></TD><TD style="COLOR: #333399; FONT-SIZE: 16pt; FONT-WEIGHT: bold"></TD><TD rowSpan=2 colSpan=3></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD><TD style="FONT-SIZE: 8pt"></TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">4</TD><TD></TD><TD style="FONT-SIZE: 8pt"></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD></TD><TD style="BACKGROUND-COLOR: #808080; FONT-SIZE: 9pt">Erase Data:</TD><TD style="BACKGROUND-COLOR: #808080; FONT-SIZE: 9pt"></TD><TD style="BACKGROUND-COLOR: #808080; FONT-SIZE: 9pt"></TD></TR><TR style="HEIGHT: 38px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">5</TD><TD></TD><TD style="TEXT-ALIGN: center">Date</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; COLOR: #333399; FONT-SIZE: 9pt">2</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; COLOR: #333399; FONT-SIZE: 9pt">3</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; COLOR: #333399; FONT-SIZE: 9pt">4</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; COLOR: #333399; FONT-SIZE: 9pt">5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; COLOR: #333399; FONT-SIZE: 9pt">6</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; COLOR: #333399; FONT-SIZE: 9pt">8</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; COLOR: #333399; FONT-SIZE: 9pt">10</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; COLOR: #333399; FONT-SIZE: 9pt">12</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; COLOR: #333399; FONT-SIZE: 9pt">15</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; COLOR: #333399; FONT-SIZE: 9pt">20</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; COLOR: #333399; FONT-SIZE: 9pt">25</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; COLOR: #333399; FONT-SIZE: 9pt">30</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; COLOR: #333399; FONT-SIZE: 9pt">35</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; COLOR: #333399; FONT-SIZE: 9pt">40</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #c0c0c0; COLOR: #333399; FONT-SIZE: 9pt">60</TD></TR><TR style="HEIGHT: 5px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">6</TD><TD></TD><TD style="TEXT-ALIGN: left; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">.</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">2</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">3</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">4</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">6</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">8</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">10</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">12</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">15</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">20</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">25</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">30</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">35</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">40</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #333399; COLOR: #333333; FONT-SIZE: 8pt">60</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">7</TD><TD></TD><TD style="TEXT-ALIGN: left; FONT-SIZE: 8pt">13/04/2011 10:41</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">18</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">5</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">57</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">37</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">26</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">19</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">3</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">12</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">13</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.5</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">8</TD><TD></TD><TD style="TEXT-ALIGN: left; FONT-SIZE: 8pt">14/04/2011 10:47</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">18</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">16</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">57</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">45</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">8</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">19</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">10</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">20</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">13</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.75</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">9</TD><TD></TD><TD style="TEXT-ALIGN: left; FONT-SIZE: 8pt">15/04/2011 10:55</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">18</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">16</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">52</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">45</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">8</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">19</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">8</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">18</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">11</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.75</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">10</TD><TD></TD><TD style="TEXT-ALIGN: left; FONT-SIZE: 8pt">18/04/2011 11:33</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">18</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">16</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">52</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">45</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">12</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">19</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">7</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">12</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.5</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">11</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.75</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">11</TD><TD></TD><TD style="TEXT-ALIGN: left; FONT-SIZE: 8pt">19/04/2011 10:50</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">18</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">16</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">52</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">43</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">11</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">11</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">6</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">10</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.5</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">10</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.75</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">12</TD><TD></TD><TD style="TEXT-ALIGN: left; FONT-SIZE: 8pt">20/04/2011 10:08</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">18</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">16</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">48</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">43</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">2</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">11</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">4.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">9.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">9</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.75</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">13</TD><TD></TD><TD style="TEXT-ALIGN: left; FONT-SIZE: 8pt">21/04/2011 09:56</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">18</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">16</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">38</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">43</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">4</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">4.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">8.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">9</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.75</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">14</TD><TD></TD><TD style="TEXT-ALIGN: left; FONT-SIZE: 8pt">26/04/2011 10:51</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">18</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">12</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">38</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">43</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">2.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">8.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">8</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.75</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">15</TD><TD></TD><TD style="TEXT-ALIGN: left; FONT-SIZE: 8pt">27/04/2011 10:06</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">18</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">12</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">38</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">43</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">2</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">7</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">7</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">16</TD><TD></TD><TD style="TEXT-ALIGN: left; FONT-SIZE: 8pt">28/04/2011 09:20</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">18</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">12</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">35</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">42</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">2</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">2</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">7</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">17</TD><TD></TD><TD style="TEXT-ALIGN: left; FONT-SIZE: 8pt">28/04/2011 10:28</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">18</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">12</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">35.5</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">42</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">6</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">0.5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD></TR><TR style="HEIGHT: 17px"><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #cacaca; FONT-SIZE: 8pt">18</TD><TD></TD><TD style="TEXT-ALIGN: left; FONT-SIZE: 8pt">04/05/2011 10:58</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">17</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">4</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">33</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">42</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">1</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD><TD style="TEXT-ALIGN: center; FONT-SIZE: 8pt">5</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0.25</TD><TD style="TEXT-ALIGN: center; BACKGROUND-COLOR: #ff9900; FONT-SIZE: 8pt">0</TD></TR></TBODY></TABLE>


Excel tables to the web >> http://www.excel-jeanie-html.de/index.php?f=1" target="_blank"> Excel Jeanie HTML 4
 
Upvote 0
Glad you got it working.

I still don't think you need all the ifs.

I actually did some code but was waiting for your next post.

Do you want me to post it?

As for the worksheet reference thing, I promise you selecting won't guarantee VBA will use the right sheet.

Adding a reference is straightforward, just a couple of deletions and some additions.
 
Upvote 0
Thanks for getting back...

I realise the code is bulky and inefficient, and I would love to learn a better way so please, by all means, lets see what you got, and I'll use it.
 
Upvote 0
Well I'll post it, but I'm not saying you should use it.

Your code might be 'bulky and inefficent' but if it works that's the important thing.

Anyway here you go, totally untested I'm afraid.
Code:
Option Explicit
 
Private Sub CommandButton1_Click()
Dim colOffset As Long
Dim lngRow As Long
Dim lngRow_pro As Long
 
    Application.ScreenUpdating = False
 
    Select Case ComboBox1.Value
 
        Case "Plate"
 
            colOffset = ComboBox3.ListIndex
 
            If ComboBox2.ListIndex <> -1 Then
            
                lngRow = ComboBox2.ListIndex + 7
                
                With Sheets("Plate Tracker")
                    TextBox2.Value = .Range("D" & lngRow).Offset(, colOffset).Value
                    TextBox1.Value = .Range("T" & lngRow).Offset(, colOffset).Value
                    TextBox3.Value = .Range("AJ" & lngRow).Offset(, colOffset).Value
                    TextBox4.Value = .Range("AZ" & lngRow).Offset(, colOffset).Value
                End With
                
            End If
 
        Case "Profile"
            If ComboBox3.Value = "300-8470" Then
            
                If ComboBox2.ListIndex <> -1 Then
            
                    lngRow_pro = ComboBox2.ListIndex + 7
                    
                    With Sheets("Profile Tracker")
                        TextBox2.Value = .Range("D" & lngRow_pro).Value
                        TextBox1.Value = .Range("M" & lngRow_pro).Value
                        TextBox3.Value = .Range("V" & lngRow_pro).Value
                        TextBox4.Value = .Range("AE" & lngRow_pro).Value
                    End With
                    
                End If
                
            End If
 
    End Select
 
    Application.Goto Sheets("User Interface").Range("C35"), True
 
    Application.ScreenUpdating = True
 
End Sub
Obviously I've rearranged things a bit, don't know if it would help with the actual problem you were having.

Sometimes though a liitle tidy up can help.:)

By the way I've assumed that Combobox3 is populated from the values in row 5, starting with the 3 in column D all the way up to column to 60 in column R.

Is that wrong?

I think it might be because I've just realised you might be repeating those numbers/thicknesses from T onwards, then from column AL...
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,827
Members
452,946
Latest member
JoseDavid

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top