ok i'll try to explain it better.
i have a sets of data made by four columns of data, one column for each tire of the car.
i need to load one set using a ComboBox then with 4 switch buttons i need to choose the data column of each tire.
in the combo box there is the following code:
Private Sub ComboBox1_Change()
Dim j as Integer
j=0
Sostituisci(j)
End sub
this code call the subroutine sostituisci(j) with the j variable set to 0 that means that the default column loaded is the one corresponding to the left front wheel.
now i must be able to change the wheel keeping loaded this set so i put four option button with this code:
Private sub OptionButton_Click()
Dim FrontRight as integer
FrontRight = 2
sostituisci(2)
end Sub
obviously the code is the same for the other 3 button except for the value of the variable which goes from 0 to 3 and this is explained in the following command line of the sostituisci subroutine
WorkSheets(2).Cells((28+(count*15))+i,3+j).Copy
where count is the variable which points at the set of data (0<count<20) and i is the variable which points at the columns in those particular set (0<i<10).
j is the number of the column to print and it goes from 0 (leftFront) to 3 (rightRear)
i hope u'll understand... but it's difficult for me to explain it in italian guess in english
Matteo Valentini
Modena - Italy