广·西·电·脑·服·务·网                                     设为首页  收藏本站
首 页 IT 报 道 操作系统 硬件学院 软件学院 网络学院 服 务 器 软件下载
DIY经验 数据恢复 维修宝典 电脑保养 故障症状 黑客安全 病毒快报 电脑优化
维修网点 IT 黄 页 网络游戏 大师答疑 网站技术 动漫游戏 服务社区 素材图片
 广西电脑服务网 ·广西最大的电脑服务平台
您现在的位置: 广西电脑维修在线 >> 网站技术 >> ASP技术 >> ASP技巧 >> 网站技术正文
一篇关于客户端用ASP+rds+VBA参生报表的好东东(高级篇)
作者:佚名 文章来源:不详 点击数: 更新时间:2007-2-14 14:58:01

      .Cells(RowCnt-3, 2).Value = "THE JOB INFORMATION TABLE"
        .Cells(RowCnt-3, 3).Value = date()
        .Cells(RowCnt-4, 3).Value = "The "+trim(PageNo)+"/"+trim(TotalPageCnt) +" Pages"
    end with
    'Format the title field name of cells
    With xlSheet1
        .range("A"+trim(RowCnt)  +":B"+trim(RowCnt)).merge           
        .range("A"+trim(RowCnt+1)  +":A"+trim(RowCnt+2)).merge    
        .range("B"+trim(RowCnt+1)  +":B"+trim(RowCnt+2)).merge    
        
        .range("C"+trim(RowCnt)  +":D"+trim(RowCnt)).merge
        .range("C"+trim(RowCnt+1)  +":C"+trim(RowCnt+2)).merge    
        .range("D"+trim(RowCnt+1)  +":D"+trim(RowCnt+2)).merge                  
  
        .Cells(RowCnt,  1).Value = "The job"
        .Cells(RowCnt+1,1).Value = "job_id"
        .Cells(RowCnt+1,2).Value = "job_desc"
        .Cells(RowCnt,  3).Value = "Level"
        .Cells(RowCnt+1,3).Value = "Max level"
        .Cells(RowCnt+1,4).Value = "Min level"
   End With
   RowCnt=int(RowCnt)+3
   PageNo=PageNo+1
end sub

sub foot_title()
    dim FootRow
    FootRow=1
    do while FootRow<= FootRowCnt
       With xlSheet1
            .range("C"+trim(RowCnt)+":"+"D"+trim(RowCnt)).merge    
       end with
       RowCnt=RowCnt+1
       FootRow=FootRow+1
    loop
    With xlSheet1
        .Cells(RowCnt-1, 1).Value = "A:"
        .Cells(RowCnt-1, 2).Value = "B:"
        .Cells(RowCnt-1, 3).Value = "C:"
    end with
end sub

sub format_grid()
dim strCode
dim MyMacro
strCode = _
"sub MyMacro() " & vbCr & _  
"dim HeadRowCnt" & vbCr & _  
"dim TitleRowCnt" & vbCr & _  
"dim ContentRowCnt" & vbCr & _  
"dim FootRowCnt" & vbCr & _  
"dim PageRowCnt" & vbCr & _  
"dim BgnCnt" & vbCr & _  
"HeadRowCnt="& HeadRowCnt &"" & vbCr & _
"TitleRowCnt="& TitleRowCnt &"" & vbCr & _
"ContentRowCnt="& ContentRowCnt &"" & vbCr & _
"FootRowCnt="& FootRowCnt &"" & vbCr & _
"PageRowCnt=HeadRowCnt+TitleRowCnt+ContentRowCnt+FootRowCnt" & vbCr & _
"BgnCnt=1" & vbCr & _  
"PageNo=1" & vbCr & _
"Range(""A""+trim(BgnCnt)+"":D""+trim(BgnCnt)).Select" & vbCr & _
"With sheet1" & vbCr & _
"    .Range(""A1"").ColumnWidth = "& ColumnAWidth&"" & vbCr & _
"    .Range(""B1"").ColumnWidth = "& ColumnBWidth&"" & vbCr & _
"    .Range(""C1"").ColumnWidth = "& ColumnCWidth&"" & vbCr & _
"    .Range(""D1"").ColumnWidth = "& ColumnDWidth&"" & vbCr & _
"End With" & vbCr & _          
"do while PageNo<= "& TotalPageCnt&"" & vbCr & _
   "if PageNo= "& TotalPageCnt& " then" & vbCr & _   
   "   ContentRowCnt="& ContentRowNowCnt &"" & vbCr & _
   "   PageRowCnt=HeadRowCnt+TitleRowCnt+ContentRowCnt+FootRowCnt" & vbCr & _      
   "end if" & vbCr & _   
   "Range(""A""+trim(BgnCnt)+"":D""+trim(BgnCnt+PageRowCnt-1)).Select" & vbCr & _
   "With Range(""A""+trim(BgnCnt)+"":D""+trim(BgnCnt+PageRowCnt-1))" & vbCr & _
   "    .Borders.LineStyle = xlContnuous" & vbCr & _
   "    .Borders.Weight = xlThin" & vbCr & _
   "    .Borders.ColorIndex = 10" & vbCr & _
   "    .RowHeight = 15" & vbCr & _
   "    .VerticalAlignment = xlCenter" & vbCr & _
   "    .HorizontalAlignment = xlLeft" & vbCr & _
   "    .Font.Size = 9" & vbCr & _
   "End With" & vbCr & _    
   "With Range(""A""+trim(BgnCnt)+"":D""+trim(BgnCnt+HeadRowCnt-1))" & vbCr & _
   "    .Font.Size = 11" & vbCr & _
   "    .Font.Bold = True" & vbCr & _
   "    .Borders.LineStyle = xlLineStyleNone" & vbCr & _
   "    .VerticalAlignment = xlCenter" & vbCr & _
   "    .HorizontalAlignment = xlCenter" & vbCr & _
   "    .Orientation = xlHorizontal" & vbCr & _
   "End With" & vbCr & _
   "With Range(""A""+trim(BgnCnt+HeadRowCnt)+"":D""+trim(BgnCnt+HeadRowCnt+TitleRowCnt-1))" & vbCr & _
   "    .WrapText = True" & vbCr & _
   "    .Font.Size = 9" & vbCr & _
   "    .Font.Bold = True" & vbCr & _
   "    .VerticalAlignment = xlCenter" & vbCr & _
   "    .HorizontalAlignment = xlCenter" & vbCr & _
   "    .Orientation = xlHorizontal" & vbCr & _
   "end With" & vbCr & _
   "With Range(""A""+trim(BgnCnt+HeadRowCnt+TitleRowCnt+ContentRowCnt)+"":D""+trim(BgnCnt+HeadRowCnt+TitleRowCnt+ContentRowCnt+FootRowCnt-1))" & vbCr & _
   "    .Font.Size = 9" & vbCr & _
   "    .Font.Bold = True" & vbCr & _
   "    .Borders.LineStyle = xlLineStyleNone" & vbCr & _
   "    .VerticalAlignment = xlCenter" & vbCr & _
   "    .HorizontalAlignment = xlLeft" & vbCr & _
   "    .Orientation = xlHorizontal" & vbCr & _
   "end With" & vbCr & _   
   "PageNo=PageNo+1" & vbCr & _
   "BgnCnt=BgnCnt+PageRowCnt" & vbCr & _
"loop" & vbCr & _   
"With Sheet1.PageSetup" & vbCr & _   
"       .HeaderMargin = application.CentimetersToPoints(0)" & vbCr & _   
"       .LeftMargin = application.CentimetersToPoints(2)" & vbCr & _   
"       .RightMargin =application.CentimetersToPoints(2)" & vbCr & _   
"       .TopMargin = application.CentimetersToPoints(1)" & vbCr & _   
"       .BottomMargin = application.CentimetersToPoints(1)" & vbCr & _   
"       .FooterMargin = application.CentimetersToPoints(0)" & vbCr & _   
"'    &nbs

上一页  [1] [2] [3] 下一页

 
网站技术录入:admin    责任编辑:admin 
  • 上一篇网站技术:

  • 下一篇网站技术:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

     IT图片报道

    联想D222到货22寸LCD迅速串红市场

    入门超频王!双敏945PL狂跑1200 F

    冠捷春季新品197V+突破高对比上市

    核心500MHz!性价比王者双敏X1650
     IT热点报道

    普通IT报道 联想D222到货22寸LCD迅速串红市场
    推荐IT报道 入门超频王!双敏945PL狂跑1200 FSB!
    推荐IT报道 冠捷春季新品197V+突破高对比上市
    普通IT报道 核心500MHz!性价比王者双敏X1650GT登场!
    普通IT报道 549元双敏945GC主板到货!
    普通IT报道 宏碁笔记本存储王As3683升级送礼!
    普通IT报道 魅族MP3全线暴跌 M6SP4G版不足700
    普通IT报道 OPPO首款顶级4.3寸大屏MP4 A3上市
    普通IT报道 维修服务拯救PC,谁拯救维修服务?
    普通IT报道 影驰8800GTS游戏盒子上市
    关于公司 | 免责声明 | 广告服务 | 招贤纳士 | 联系我们 | 友情链接 | 网站地图 1 2 3
    Copyright@2005 - 2006  http://www.GXF.com.cn  All Right Reserved  
    桂ICP备06002242号

    技术咨询
    22097366
    10231086
    30636841
    技术交流群
    27717914