可以通过宏来显示 Excel 的窗口(例如“自定义排序”窗口)吗?

huangapple go评论50阅读模式
英文:

Can a window of excel (for example "custom sort" window) appear by macro?

问题

我不想通过VBA对范围进行排序,因为排序窗口更通用并提供更多选择。在Excel中,排序窗口可以通过快捷键“Alt + H + S + U”来打开。但我们是否可以编写一个宏来(选择工作表的特定范围并)显示此窗口?

英文:

I do not want to sort a range by VBA because the sort window is more general and give more selection. The sort window in excel can appear by the shortcut: "Alt + H + S + U". But can we write a macro that (select a special range of a sheet and) show this window?

答案1

得分: 3

如果活动单元格可筛选,则使用:

Application.Dialogs(xlDialogSort).Show

英文:

If the activecell is filterable then use:

> Application.Dialogs(xlDialogSort).Show

huangapple
  • 本文由 发表于 2023年6月22日 15:30:03
  • 转载请务必保留本文链接:https://go.coder-hub.com/76529511.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定