有关【二义性】错误, Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Column
PrivateSubWorksheet_SelectionChange(ByValTargetAsRange)IfTarget.Column=3ThenMe.Calend...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 3 Then
Me.Calendar1.Visible = True
Else
Me.Calendar1.Visible = False
End If
Calendar1.Top = ActiveCell.Top
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
Dim arr
arr = Sheets("拼音简码").[A2].Resize(Sheets("拼音简码").[A65536].End(xlUp).Row - 1, 1)
If Target.Cells.Count = 1 And Target.Column = 4 And Target.Row > 2 Then
With ComboBox1
.Visible = True
.Left = ActiveCell.Left
.Top = ActiveCell.Top
.Width = ActiveCell.Width
.Height = ActiveCell.Height
.Text = ""
End With
ComboBox1.Clear
ComboBox1.List = arr
ComboBox1.Activate
End If
Application.ScreenUpdating = True
End Sub
请问如何将这两段代码合并在一起,解决二义性错误?????? 展开
If Target.Column = 3 Then
Me.Calendar1.Visible = True
Else
Me.Calendar1.Visible = False
End If
Calendar1.Top = ActiveCell.Top
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.ScreenUpdating = False
Dim arr
arr = Sheets("拼音简码").[A2].Resize(Sheets("拼音简码").[A65536].End(xlUp).Row - 1, 1)
If Target.Cells.Count = 1 And Target.Column = 4 And Target.Row > 2 Then
With ComboBox1
.Visible = True
.Left = ActiveCell.Left
.Top = ActiveCell.Top
.Width = ActiveCell.Width
.Height = ActiveCell.Height
.Text = ""
End With
ComboBox1.Clear
ComboBox1.List = arr
ComboBox1.Activate
End If
Application.ScreenUpdating = True
End Sub
请问如何将这两段代码合并在一起,解决二义性错误?????? 展开
2个回答
2011-05-06
展开全部
同一个过程不能在同一模块中出现两次,Worksheet_Change()应该放在不同的模块中。
有什么问题可以H我。
另外,虚机团上产品团购,超级便宜
有什么问题可以H我。
另外,虚机团上产品团购,超级便宜
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询