vba 我可以在不使用中键的情况下让 Excel 平滑滚动吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7200000/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 11:49:32  来源:igfitidea点击:

Can I make Excel scroll smoothly without using middle-click?

excelvbaadd-in

提问by Luke

I must work with nightmare Excel files. (I didn't create them, I just have to work with them).

我必须使用噩梦般的 Excel 文件。(我没有创建它们,我只需要与它们一起工作)。

They were so big (more than 50 big columns and 100 big rows) then I must scroll up/down and use "<" and ">" buttons to scroll left and right. When I scroll around, Excel always jumps to the next column or row. This make me crazy!

它们太大了(超过 50 个大列和 100 个大行)然后我必须向上/向下滚动并使用“<”和“>”按钮向左和向右滚动。当我滚动时,Excel 总是跳到下一列或下一行。这让我发疯!

Can I develop a plugin or add-in to make Excel just scroll smoothly, like web browsers do? If so, please give me some resource or just some keyword to learn how to do it.

我可以开发一个插件或加载项来让 Excel 像 Web 浏览器一样平滑滚动吗?如果是这样,请给我一些资源或一些关键字来学习如何做。

采纳答案by JMax

Another tip: when you click on Scroll lockon your keyboard, this will change the way your arrows keys will work.

另一个提示:当您单击Scroll lock键盘时,这将改变箭头键的工作方式。

Instead of moving from cell to cell, it will move the screen.

它将移动屏幕,而不是从一个单元格移动到另一个单元格。

Yet, as Issun said, you cannot change Excel and AFAIK, you cannot "split" a cell when scrolling.

然而,正如 Issun 所说,您不能更改 Excel 和 AFAIK,您不能在滚动时“拆分”单元格。

Furthermore, you can also change the number of rows that will scrollin the Windows Control Panel.

此外,您还可以更改将在 Windows 控制面板中滚动的行数

回答by aevanko

I'm sorry to tell you but the snapping to the top of a cell when you scroll is a design choice by Microsoft that you simply cannot get around while working within Excel. You can middle click your mouse to enable smooth preview zoom with the mouse, but once you click the program, it will snap back.

很遗憾地告诉您,滚动时对齐单元格顶部是 Microsoft 的设计选择,您在 Excel 中工作时根本无法绕过。您可以单击鼠标中键以使用鼠标启用平滑预览缩放,但是一旦单击该程序,它就会弹回。

Instead of looking for a plug-in, you should look for a different program to run the .xls files to work on them. Perhaps even something as simple as opening the document in Google docs might allow you to scroll normally.

您应该寻找不同的程序来运行 .xls 文件来处理它们,而不是寻找插件。也许甚至像在 Google 文档中打开文档这样简单的事情也可以让您正常滚动。

That being said, if you are having the problem of the cells being so big that when you scroll down it skips over some cells, assign either a command button or keyboard shortcut to this macro:

话虽如此,如果您遇到单元格太大的问题,以至于当您向下滚动时它会跳过某些单元格,请为此宏指定一个命令按钮或键盘快捷键:

Sub DownOne()
ActiveWindow.SmallScroll Down:=1
End Sub

I have used this on several occasions due to Excel skipping cells because of their size. The reason is that the mouse "single scroll down" is by default set to Down:=3You might be able to map this macro to a mouse wheel scroll event, but I believe you need to add a .dll to use that event (ref: http://support.microsoft.com/kb/837910)

由于 Excel 跳过单元格的大小,我曾多次使用它。原因是鼠标“单次向下滚动”默认设置为Down:=3您也许可以将此宏映射到鼠标滚轮滚动事件,但我相信您需要添加一个 .dll 才能使用该事件(参考:http: //support.microsoft.com/kb/837910

回答by user3551324

Click down on scroll wheel (middle) of mouse (remember not turn, but click down). This will produce unique four way arrow. Now drag mouse up or down (or even sideways, left or right) and you will get slow smooth scroll.

单击鼠标的滚轮(中间)(记住不要转动,而是单击)。这将产生独特的四向箭头。现在向上或向下拖动鼠标(甚至横向,向左或向右),您将获得缓慢的平滑滚动。

回答by Kunzy

Well, this is an extremely old thread, but I was having the same problem today.

好吧,这是一个非常古老的线程,但我今天遇到了同样的问题。

Try going into your Mouse Settings in Control Panel and set your Wheel to Scroll 1 line at at a time.. I have some rows that are merged, and it was frustrating the hell out of me how quickly it would scroll past them. Turns out, I had my Wheel set to scroll 3 lines at a time (default I think).

尝试进入“控制面板”中的“鼠标设置”,并将“滚轮”设置为一次滚动 1 行。我有一些行已合并,这让我感到非常沮丧,它滚过它们的速度有多快。事实证明,我将 Wheel 设置为一次滚动 3 行(我认为是默认设置)。

Took me forever to figure it out (felt like an idiot once I did).

花了我很长时间才弄明白(一旦我这样做就感觉像个白痴)。

Note - You'll want to go back and set it back to 3 lines when you're done in Excel because it makes it painfully slow to scroll in your web browser.

注意 - 在 Excel 中完成后,您需要返回并将其设置回 3 行,因为这会使在 Web 浏览器中滚动速度非常缓慢。

回答by Marj

Old thread I know, but I found a work around (if this is a repeat suggestion, sorry). Leave Column A alone, with "normal" sized cells. You can hide this column if you don't want to see it. Put all your contents in the remaining columns as you normally would and merge the content over several rows. Since column A is normal sized, you will get "smooth scrolling".

我知道旧线程,但我找到了解决方法(如果这是重复的建议,抱歉)。单独保留 A 列,使用“正常”大小的单元格。如果您不想看到它,您可以隐藏它。像往常一样将所有内容放在剩余的列中,然后将内容合并到多行中。由于 A 列是正常大小,您将获得“平滑滚动”。

回答by user3524289

I had the same problem until I upgraded by office from 2014 to 2017. Now I have office 2017 [version 15.33 (170409)] and I can scroll by pixels using Mouse as well as Laptop trackpad. I am using MacOS Sierra version 10 operating system.

我遇到了同样的问题,直到我从 2014 年到 2017 年通过 office 升级。现在我有 office 2017 [版本 15.33 (170409)],我可以使用鼠标和笔记本电脑触控板按像素滚动。我使用的是 MacOS Sierra 版本 10 操作系统。