请问带宏的excel共享工作簿后。报错1004.怎么解决

Private Sub ListBox1_Change()If Reload Then Exit Sub '见下方说明For i = 0 To ListBox1.ListCount - 1If ListBox1.Selected(i) = True Then t = t & "," & ListBox1.List(i)NextActiveCell = Mid(t, 2)End SubPrivate Sub Worksheet_SelectionChange(ByVal Target As Range)With ListBox1If ActiveCell.Column = 11 And ActiveCell.Row > 8 Thent = ActiveCell.ValueReload = True '如果是根据单元格的值修改列表框,则暂时屏蔽listbox的change事件。For i = 0 To .ListCount - 1 '根据活动单元格内容修改列表框中被选中的内容If InStr(t, .List(i)) Then.Selected(i) = TrueElse.Selected(i) = FalseEnd IfNextReload = False.Top = ActiveCell.Top + ActiveCell.Height '以下语句根据活动单元格位置显示列表框.Left = ActiveCell.Left.Width = ActiveCell.Width.Visible = TrueElse.Visible = FalseEnd IfEnd WithEnd Sub

.Top = ActiveCell.Top + ActiveCell.Height '以下语句根据活动单元格位置显示列表框
.Left = ActiveCell.Left
.Width = ActiveCell.Width
.Visible = True

将上面的语句调放到Reload = True 的下面试试。追问

不行啊。本人不懂VBA

温馨提示:答案为网友推荐,仅供参考
相似回答