有关vb中调用excel的问题?

blackfishliving 2005-09-23 04:52:28
如何在程序中合并多个单元格?如何指定某一列的宽度,如何给数据区画框?
...全文
154 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
chtlover 2005-09-24
  • 打赏
  • 举报
回复
楼上说的好
samwzhang 2005-09-24
  • 打赏
  • 举报
回复
教你个EXCEL编程的有效的土办法:
你想做什么功能时:到EXCEL里边去录制一个同样功能的宏,然后把那个宏的VBA代码拷到VB里边,再改成VB格式,就OK了。
samwzhang 2005-09-24
  • 打赏
  • 举报
回复
当然无效了,你连EXCEL对象都不用,能有效的了吗?
blackfishliving 2005-09-23
  • 打赏
  • 举报
回复
怎么会提示无效或不合格的引用?
blackfishliving 2005-09-23
  • 打赏
  • 举报
回复
with后面应该是什么对象?
chtlover 2005-09-23
  • 打赏
  • 举报
回复
楼上正解

samwzhang 2005-09-23
  • 打赏
  • 举报
回复
如何在程序中合并多个单元格?.Range("H1:I1").MergeCells = True
如何指定某一列的宽度?.Columns(K).ColumnWidth =
如何给数据区画框?
With .Range("A2:" & CalExcelLNum(kk) & (K + 1))
With .Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlInsideVertical)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
With .Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = xlAutomatic
End With
End With

7,788

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧