Excel多项选择 [英] Excel multiple selections

查看:344
本文介绍了Excel多项选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在同一时间选择不同且不同的单元格范围。



how can i select different and separate ranges of cells on the same time .

Dim SelectionRange As Excel.Range
SelectionRange = xlWorkSheet.Range("A1","k1")
       SelectionRange.BorderAround(Excel.XlLineStyle.xlContinuous, Excel.XlBorderWeight.xlMedium, Excel.XlColorIndex.xlColorIndexAutomatic, Excel.XlColorIndex.xlColorIndexAutomatic)





i使用以上多次格式化excel表。有没有办法进行多次选择以保存10'代码行。

i不知道为什么IntelliSense不能用于大多数excel函数。



i am using the above many times to format the excel sheet. is there a way to make multiple selection to save 10''s of codes lines.
i don''t know why IntelliSense is not working for most of excel functions.

推荐答案

我能做的唯一方法就是



the only way that i can do is just

SelectionRange = xlWorkSheet.Range("A5:k5")
       SelectionRange2 = xlWorkSheet.Range("A10:k10")
       UnionRange = xlApp.Union(SelectionRange, SelectionRange2)
       UnionRange.BorderAround(Excel.XlLineStyle.xlContinuous, Excel.XlBorderWeight.xlMedium, Excel.XlColorIndex.xlColorIndexAutomatic, Excel.XlColorIndex.xlColorIndexAutomatic)





比这更容易......



anything easier than this...


这篇关于Excel多项选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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