这段代码有时成功执行,有时报错“类Range的Select方法无效”
搞不懂啊!请大侠指点!
xlSheet.Range("A" & L).Select
Selection.EntireRow.Insert
搞不懂啊!请大侠指点!
xlSheet.Range("A" & L).Select
Selection.EntireRow.Insert
解决方案 »
- 可执行文件加动态进入密码
- vb中怎么检测sql的语法错误??
- 自已做了一个自定义用户控件,可是放到窗体中,改变大小保存时便会被斜线覆盖,而且所有自定义属性全无,关闭窗体重新打开后才正常?
- 请问什么是X/Open规范?在线等。。。
- 编译问题,高手请进!!
- Public gintSmode As Integer 为什么提示用户类型未定义
- vb inet post数据的问题
- 如何象Vb一样得到可用的Activex控件列表
- 怎样在程序中实现象WEB中的登录进网站?
- memo类型在mshflexgrid中不显示!
- web控件打开网页2.htm(有个frame的src是3.htm),3.htm使用document.write画出一个 ID="sourceEditor"的编辑框,怎么填写?
- 求助 SendMessage 鼠标点击WebBrowser1 已得到句柄 不知道怎么点
然后无论是把添加的代码删除还是保存关闭,都不能正常运行了。
换台机器好像就可以运行了,真奇怪!xlSheet.Range("A" & L).Select
Selection.EntireRow.Insert
xlSheet.Range(Cells(L, 1), Cells(L, 34)).Select
Selection.Interior.ColorIndex = 0
Selection.Copy
我昏倒!这玩意儿整人的?
高手啊!提点提点小弟吧!!!
L = 3
Do
Select Case xlSheet.Cells(L, 1)
Case Is <> ""
L = L + 1
End Select
Loop Until xlSheet.Cells(L, 1).Value = ""
xlSheet.Range("A" & L).Select
Selection.EntireRow.Insert
For R = 1 To 6
xlSheet.Cells(L, ZR(R)) = "●"
Next R
xlSheet.Cells(L, 1) = Text2.Text
xlSheet.Range(Cells(L, 1), Cells(L, 34)).Select
Selection.Interior.ColorIndex = 0
Selection.Copy
xlBook.Sheets("直连").Select
Range("A" & L).Select
Selection.Insert Shift:=xlDown
Selection.Copy
xlBook.Sheets("左斜连1").Select
Range("A" & L).Select
Selection.Insert Shift:=xlDown
Selection.Copy
xlBook.Sheets("左斜连2").Select
Range("A" & L).Select
Selection.Insert Shift:=xlDown
Selection.Copy
xlBook.Sheets("左斜连3").Select
Range("A" & L).Select
Selection.Insert Shift:=xlDown
Selection.Copy
xlBook.Sheets("左斜连4").Select
Range("A" & L).Select
Selection.Insert Shift:=xlDown
Selection.Copy
xlBook.Sheets("横连").Select
Range("A" & L).Select
Selection.Insert Shift:=xlDown
Selection.Copy
xlBook.Sheets("右斜连1").Select
Range("A" & L).Select
Selection.Insert Shift:=xlDown
Selection.Copy
xlBook.Sheets("右斜连2").Select
Range("A" & L).Select
Selection.Insert Shift:=xlDown
Selection.Copy
xlBook.Sheets("右斜连3").Select
Range("A" & L).Select
Selection.Insert Shift:=xlDown
Selection.Copy
xlBook.Sheets("右斜连4").Select
Range("A" & L).Select
Selection.Insert Shift:=xlDown
xlBook.Sheets("Sheet1").Select
xlSheet.Range(Cells(L - 10, 1), Cells(1, 34)).Select
Selection.Interior.ColorIndex = 0
xlSheet.Range(Cells(L - 5, 1), Cells(L - 9, 34)).Select
Selection.Interior.ColorIndex = 35
xlSheet.Range(Cells(L, 1), Cells(L - 4, 34)).Select
Selection.Interior.ColorIndex = 36
比如: *.select
selection.* = *
像这样的语句,你可以直接写成* . * = *,把select和selection都去掉!