Filter = "A6 = _UserName"
改为:
Filter = "A6 ='“ & _UserName & "'"
建议看看:
http://www.foxtable.com/help/topics/1284.htm
Filter = "DD = 1 And DD = 3"
Filter = "DD = 1 Or DD = 3"
理由你自己想想。