逐鹿中原怎么完成新手任务

小迪 小迪
回答
  • 疯子雷 疯子雷

    sub 宏1()
    dim x1!y1!x2!y2!dim i%,ii%,rng1 as range,rng2 as range,r%,c%
    x1=154.5
    y1=21
    x2=262.5
    y2=48.75
    dim shp as object
    for each shp in activesheet.shapes
    shp.delete
    next
    activesheet.cells.interior.pattern=xlnone
    for i=1 to 20
    for ii=1 to 11
    if cells(i,ii)<>""then
    set rng1=cells(i,ii)
    x1=rng1.left+rng1.width
    y1=rng1.top+rng1.height/2
    rng1.interior.color=65535
    goto line1
    end if
    next
    next
    line1:
    r=i
    c=ii
    for j=1 to 20
    for jj=1 to 11
    if cells(j,jj)<>""and j<>r and jj<>c then
    set rng2=cells(j,jj)
    x2=rng2.left+rng2.width
    y2=rng2.top+rng2.height/2
    rng2.interior.color=65535
    with activesheet.shapes.addline(x1,y1,x2,y2)
    end with
    x1=x2
    y1=y2
    end if
    next
    next
    end sub

类似问答
精品推荐

友情链接

友链互换QQ:

谷财 备案编号:蜀ICP备11019336号-3商务合作:235-677-2621

Copyright 2009-2020 Chengdu Sanzilewan Technology Co.,Ltd all rights reserve

抵制不良游戏 拒绝盗版游戏 注意自我保护 谨防受骗上当 适度游戏益脑 沉迷游戏伤身 合理安排时间 享受健康生活