When you do this:
CS_prog = Sheets("05_S2").Range("$D$8:$D$35")
CS_Prog becomes a 28 row x 1 column array.
Likewise:
stud_grp is a 39 rows x 1 column array.
cs_dip is 28 x 1
What are you trying to do?
tandavina wrote:
What is wrong with this? it has run-time error:'13' Type mismatch.
Private Sub CommandButton2_Click()
stud_grp = Sheets("StudGrp_BU").Range("$B$24:$B$62")
CS_prog = Sheets("05_S2").Range("$D$8:$D$35")
CS_dip = Sheets("05_S2").Range("$E$8:$E$35")
time_slots = Sheets("StudGrp_BU").Range("$C$6:$CN$7")
If stud_grp = CS_prog And CS_dip Then (this was highlighted when i
clicked on the button)
time_slots = 1
End If
End Sub
Please help. Thank you.
--
tandavina
------------------------------------------------------------------------
tandavina's Profile: http://www.excelforum.com/member.php...o&userid=30334
View this thread: http://www.excelforum.com/showthread...hreadid=500483
--
Dave Peterson