我有
' When Selection is Changed
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Rem call the - Sort_Customers_Countries - Subroutine & call the - Go_First_Sheet - Subroutine
If Not Intersect(Target, Me.Range("cel__Sheets_Formula")) Is Nothing Then
Sort_Customers_Countries
Go_First_Sheet
End If
Rem call the - Center_Resize_Image - Subroutine
If Not Intersect(Target, Me.Range("col__Customer_Country_Flag")) Is Nothing Then
Center_Resize_Image
End If
End Sub
字符串
问题是,当选择cel__Sheets_Formula
时,它会同时运行Sort_Customers_Countries
和Go_First_Sheet
以及Center_Resize_Image
我怀疑它与Target
有关。cel__Sheets_Formula
是一个命名的单元格,col__Customer_Country_Flag
是一个表中命名的列。
命名范围不相交。cel__Sheets_Formula='Customers Countries'!$F$1
和col__Customer_Country_Flag=tbl__Customers_Countries[Customer Country Flag]
1条答案
按热度按时间azpvetkf1#
编辑
看来解决办法是
字符串