Sub aSmpLine()
Sheet1.Shapes.AddLine(100, 100, 180, 150).Name = "Line1"
With [line1].ShapeRange.Line
.Weight = 3
.DashStyle = msoLineSolid
.Style = msoLineThinThin
.Visible = True
.ForeColor.SchemeColor = 10
.BackColor.RGB = RGB(255, 255, 255)
.EndArrowheadStyle = msoArrowheadTriangle
.EndArrowheadLength = msoArrowheadLengthMedium
.EndArrowheadWidth = msoArrowheadWidthMedium
End With
MsgBox "Will deleted!"
[line1].Delete
End Sub请帮忙将以上EXCEL的VBA语句翻译成Delphi语句,急用,谢谢!
Sheet1.Shapes.AddLine(100, 100, 180, 150).Name = "Line1"
With [line1].ShapeRange.Line
.Weight = 3
.DashStyle = msoLineSolid
.Style = msoLineThinThin
.Visible = True
.ForeColor.SchemeColor = 10
.BackColor.RGB = RGB(255, 255, 255)
.EndArrowheadStyle = msoArrowheadTriangle
.EndArrowheadLength = msoArrowheadLengthMedium
.EndArrowheadWidth = msoArrowheadWidthMedium
End With
MsgBox "Will deleted!"
[line1].Delete
End Sub请帮忙将以上EXCEL的VBA语句翻译成Delphi语句,急用,谢谢!
解决方案 »
- 一个倒灶的des算法,大家帮忙看下
- 问个简单的问题,共享数据结构
- MDI子窗口多线程SQL查询没响应
- 一般高手来啊!请问怎么样格式化字符串?
- FastReport小计分组显示,如何当明细数量为1时不显示小计,只有当明细数量大于1时才显示小计????
- 键盘和鼠标勾子的问题,一直都想不明白!!高手请进!!
- 怎样才能让TRichViewEdit在Paste的时候过滤内容?
- 寻找兼职程序员(限北京)有意者请与我联系¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥¥
- 怎样用delphi将其它EXE文件的图标(例如VB写的)更换,怎么做?在线等待!!!
- 一个好重要的问题!!!!!
- 如果在线程中出现异常会怎样?
- 如何在 TClipboard 粘入两种以上格式内容﹖
参考代码:
uses Comobj;
var
vExcelApp: Variant;
begin
vExcelApp := CreateOleObject('Excel.Application');
// 显示Excel界面
vExcelApp.Visible := true;
// 添加一个工作簿
vExcelApp.Workbooks.Add;
// 添加一直线
vExcelApp.ActiveSheet.Shapes.AddLine(186.75, 105.75, 323.25, 154.5).Select;
vExcelApp.Selection.ShapeRange.Flip(1); // msoFlipVertical
// 添加一箭头
vExcelApp.ActiveSheet.Shapes.AddLine(227.25, 177.75, 342.75, 225).Select;
vExcelApp.Selection.ShapeRange.Line.EndArrowheadStyle := 2; // msoArrowheadTriangle
vExcelApp.Selection.ShapeRange.Line.EndArrowheadLength := 2; // msoArrowheadLengthMedium
vExcelApp.Selection.ShapeRange.Line.EndArrowheadWidth := 2; // msoArrowheadWidthMedium
vExcelApp.Selection.ShapeRange.Flip(1); // msoFlipVertical;
// 添加一双箭头
vExcelApp.ActiveSheet.Shapes.AddLine(265.5, 231, 405, 297.75).Select;
vExcelApp.Selection.ShapeRange.Line.BeginArrowheadStyle := 2; // msoArrowheadTriangle;
vExcelApp.Selection.ShapeRange.Line.BeginArrowheadLength := 2; // msoArrowheadLengthMedium;
vExcelApp.Selection.ShapeRange.Line.BeginArrowheadWidth := 2; // msoArrowheadWidthMedium;
vExcelApp.Selection.ShapeRange.Line.EndArrowheadStyle := 2; // msoArrowheadTriangle;
vExcelApp.Selection.ShapeRange.Line.EndArrowheadLength := 2; // msoArrowheadLengthMedium;
vExcelApp.Selection.ShapeRange.Line.EndArrowheadWidth := 2; // msoArrowheadWidthMedium;
vExcelApp.Selection.ShapeRange.Flip(1); // msoFlipVertical
//...
end;