高亮显示时按Z模式移动数组并按下按钮 [英] Move Array in Z Pattern When Highlighted and Button Pushed

查看:61
本文介绍了高亮显示时按Z模式移动数组并按下按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述











我有一个工厂的工作说明我正在放入电子表格。我在纵向视图中打印标准打印机上的所有工作指令。工作表通常具有垂直堆叠的多个页面。每个页面包含大约一英寸半高的标题的
,这在所有页面中都是相同的,然后页面被分成四个相等的象限,其中一行文本作为页脚。保证金很小。



每个四边形都有一张图片,一个约1/2的彩色形状。高度,如三角形(检查),方形(工作)或圆形(验证),然后根据象限在该形状内的数字1到4(文本框)。最后,每个
quad都有文本描述与其上方图片相关的工作。通常我们必须在页面完成后添加一个步骤。
我希望能够突出显示/任何象限,按下命令按钮,然后将该象限及其所有内容与所有前面的象限一起移动到"Z"中的一个位置。模式。这样我就可以插入一条新指令了。


在工作中我写了一些代码来移动单元格内容当突出显示并按下按钮时,它不包括图片或对象,并且没有"Z"按钮。模式运动。您还必须在
单元格下方选择空行,这样内容就不会被删除或删除。


我曾经的一种方式能够提供帮助的是我添加了一个按钮,允许用户从文件夹中提取图片,vb会自动调整大小并将它们从预选的单元格开始定位,即靠近每个象限的右上角
的手角。 / p>

一些想法或帮助将不胜感激。


 


解决方案

您是在VB.Net中还是在Excel中使用vba执行此操作?


它看起来像您对电子表格所说的vba,在这种情况下,您是在这里不太可能得到太多帮助。


我怀疑解决方案(用VB说话)将每个象限作为包含图像,文本等控件的框架。这些可能然后作为一个人被'感动'乐。但是我不知道你是否可以在Excel中做到这一点 - 没有用它来做多少
年的任何事情,并且不要重新计算它有框架。但那可能是衰老的开始。 :)


I have work instructions for a factory I'm putting in a spreadsheet. I print all the work instructions on a standard printer in portrait view. The worksheet typically has multiple pages stacked vertically. Each page consists of a header about an inch and half tall, which is the same throughout all pages, then the page is split into four equal quadrants with one line of text as a footer. Margins are minimal.

Each quad has a picture, a colored shape about 1/2" tall such as a triangle (inspect), square (work) or circle (verify) and then a number 1 thru 4  (text box) inside that shape depending on the quadrant. And finally each quad has text describing the work associated with the picture above it. Often we have to add a step after a page has been completed. I want to be able to highlight a/any quadrant, push a command button and then move that quadrant and all its contents along with all preceding quadrants, down one position in a "Z" pattern. This, so that I can insert a new instruction.

At work I have some code written that moves cells content down when highlighted and the button is pushed, but it doesn't include pictures or objects and no "Z" pattern movement. You also have to select empty rows below the cells so content isn't cut or erased.

One way that I have been able to help is that I've added a button allowing the user to pull in pictures from folders and vb automatically sizes them and positions them starting at a preselected cell, i.e near the top right hand corner of each quadrant.

Some ideas or help would be greatly appreciated.

 

解决方案

Are you doing this in VB.Net or in Excel with vba?

It looks like vba from what you say about a spreadsheet, in which case you are not likely to get much help here.

I suspect the solution (in VB speak) would be to have each quadrant as a frame that contains controls for the image, text etc. These could then be 'moved' as a whole. But I don't know if you can do that in Excel - not done anything with it for a number of years, and don't recal it having frames. But that might be onset of senility. :)


这篇关于高亮显示时按Z模式移动数组并按下按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆