vba Excel 2007 ActiveWorkbook.Sheets("Feuil1").Range("A1").选择
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/20146545/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Excel 2007 ActiveWorkbook.Sheets("Feuil1").Range("A1").Select
提问by user1918315
I don't know why my Select for the Range don't work on this line. It's the right syntax for range.
我不知道为什么我的范围选择在这条线上不起作用。这是范围的正确语法。
ActiveWorkbook.Sheets("Report M-1").Select
ActiveSheet.Rows("1:1").Find("Operational Categorization Tier 1").Activate
ActiveSheet.Rows("1:1").AutoFilter field:=5, Criteria1:="SECURITY TROUBLE"
ActiveSheet.Range("A1").CurrentRegion.Copy
If FeuilleExiste("Feuil1") = False Then
ActiveWorkbook.Sheets.Add
End If
****ActiveWorkbook.Sheets("Feuil1").Range("A1:").Select****
Selection.PasteSpecial xlPasteAll
ActiveWorkbook.Save
'suppression filtre
Workbooks("Monthly security report May.xls").Activate
ActiveSheet.Rows("1:1").AutoFilter
回答by Siddharth Rout
***ActiveWorkbook.Sheets("Feuil1").Range("A1:").Select****
***ActiveWorkbook.Sheets("Feuil1").Range("A1:").Select****
You have an extra :
in the range.
你有一个额外:
的范围。
It should be
它应该是
ActiveWorkbook.Sheets("Feuil1").Range("A1").Select
BTW you should avoid the use of .Select
. You might want to see THIS LINK
顺便说一句,您应该避免使用.Select
. 你可能想看看这个链接