vova2209
Thành viên tích cực
![](/diendan/data/PhoToDanhHieu/pip.gif)
![](/diendan/data/PhoToDanhHieu/pip.gif)
- Tham gia
- 5/4/17
- Bài viết
- 835
- Được thích
- 112
- Giới tính
- Nam
- Nghề nghiệp
- Đường bộ
Mã:
Private Sub OkInBB_CDKL_Click()
Dim inStart, inFinish As Long 'Dùng Inputbox dôi? Integer
Dim i As Long
Dim shNameKL, shNameCD As String
Dim Rng As Range, DK As Long
Set Rng = Sheets("VoVa").Range("A3", Sheets("VoVa").Range("A65535").End(xlUp)).Resize(, 4)
inStart = TextBox1.Value
inFinish = TextBox2.Value
For i = inStart To inFinish
DK = Application.WorksheetFunction.VLookup(i, Rng, 4, False)
If DK > 0 Then GoTo Tiep
Sheets("BBan").Range("AZ1").Value = i
Sheets(ComboBox1).Select
Sheets(ComboBox1).Range("AZ1").Value = i
Sheets(shNameCD).Select
Sheets(shNameCD).Range("AZ1").Value = i
Next i
Unload Me
End Sub
Muốn duyệt ComboBox1 thành tên sheets phải sửa như nào.
Sheets(ComboBox1).Select
Sheets(ComboBox1).Range("AZ1").Value = i
. Em xin cảm ơn
![Untitled.png Untitled.png](https://www.giaiphapexcel.com/diendan/data/attachments/157/157196-19d5d5fd81d7e298f70db368ea5fdd08.jpg?hash=GdXV_YHX4p)