|
为什么combobox2在选择完后焦点不能转到工作表上,而还是在我做的窗体上
预想的是combobox2在选择完后焦点定位到Cells(X.Row, Y.Column),并可直接输入数据
现在是选择完后焦点还在combobox2上- Private Sub ComboBox2_Change()
- Dim sh As String
- Dim X As Range
- Dim Y As Range
- Dim a As Date
- Dim k As String
- On Error Resume Next
- a = TextBox1.Value
- k = ComboBox2.Value
- sh = ComboBox1.Text
- Sheets(sh).Select
- Set X = ActiveSheet.UsedRange.Find(a)
- Set Y = ActiveSheet.UsedRange.Find(k)
- Cells(X.Row, Y.Column).Activate
- End Sub
复制代码
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?注册
x
|