标题:vfp控制excel问题,希望将78更改为其他数字,例如33,请各位帮忙。tks!
取消只看楼主
jjoojj
Rank: 1
等 级:新手上路
帖 子:59
专家分:0
注 册:2014-8-12
结帖率:16.67%
已结贴  问题点数:10 回复次数:3 
vfp控制excel问题,希望将78更改为其他数字,例如33,请各位帮忙。tks!
搜索更多相关主题的帖子: excel 
2015-04-23 12:21
jjoojj
Rank: 1
等 级:新手上路
帖 子:59
专家分:0
注 册:2014-8-12
得分:0 
回复 2楼 wp231957
vfp命令生成的33下面多了一小横,33下面的横线怎么去掉,请帮忙。tks!
EOLE.ActiveSheet.Shapes("Text Box 5").Select
EOLE.Selection.Characters.Text = "05" + Chr(10) + "33" + Chr(10) + "" + Chr(10) + ""



2015-04-23 14:42
jjoojj
Rank: 1
等 级:新手上路
帖 子:59
专家分:0
注 册:2014-8-12
得分:0 
excel宏是如下,其中Start:=1, Length:=2和Start:=3, Length:=5在vfp中无法实现,请帮忙。tks!

ActiveSheet.Shapes("Text Box 5").Select
    Selection.Characters.Text = "05" & Chr(10) & "33" & Chr(10) & "" & Chr(10) & ""
    With Selection.Characters(Start:=1, Length:=2).Font
        .Name = "Times New Roman"
        .FontStyle = "常规"
        .Size = 10.5
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleSingle
        .ColorIndex = 1
    End With
    With Selection.Characters(Start:=3, Length:=5).Font
        .Name = "Times New Roman"
        .FontStyle = "常规"
        .Size = 10.5
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = 1
    End With
2015-04-23 15:56
jjoojj
Rank: 1
等 级:新手上路
帖 子:59
专家分:0
注 册:2014-8-12
得分:0 
  
搞定了。tks!
    EOLE.ActiveSheet.Shapes("Text Box 5").Select
    EOLE.Selection.Characters.Text = "05"  + Chr(10)+"33" + Chr(10) + "" + Chr(10) + ""
  With EOLE.Selection.Characters(3,5).Font
        .Name = "Times New Roman"
        .FontStyle = "常规"
        .Size = 10.5
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = 1
    EndWith
2015-04-23 16:34



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-444399-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.189871 second(s), 9 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved