Yes, it's been cleaned a bit and optimized since my last post... thanks guys. My problem is in the "ComboBox" function, I want to do a getstring on whichever combobox made the call... Thanks again. Josh Pavel$accountName = ""; $count = 0; $top = 5; $left = 15; foreach my $row (1..222){ foreach my $col (1..5){ if ($col eq 1 && $accountName !~ $Sheet->Cells($row,$col)->{'V +alue'}){ $accountName = $Sheet->Cells($row,$col)->{'Value'}; $accounts[$count] = $accountName; if ($count eq 9 || $count eq 18) { $left += 150; $top = 5; } $labels[$count] = $main->AddLabel( -text => $accountName, -top => $top, -left => $left ); $top += 15; $comboboxes[$count] = $main->AddCombobox( -name => $accountName."ComboBox", -top => $top, -left => $left, -width => 125, -height => 150, -tabstop => 1, -style => WS_VISIBLE | 3 | WS_VSCROLL ); $count++; $top += 25; } else { if ($col eq 2){ $value = $Sheet->Cells($row,$col)->{'Value'}; $comboboxes[$count-1]->InsertItem($value); } } } } $Book->Close; sub ComboBox{ #Help here - this.$selection = GetString(SelectedItem); ??? } foreach my $x (0..$count){ $SUB = $accounts[$x]."ComboBox_Change"; *$SUB = \&ComboBox; }
In reply to "this" variable? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |