Fork me on GitHub
摘要: 1.DOCTYPE影响CSS处理2.FF:div设置margin-left,margin-right为auto时已经居中,IE不行3.FF:body设置text-align时,div需要设置margin:auto(主要是margin-left,margin-right)方可居中4.FF:设置padding后,div会增加height和width,但IE不会,故需要用!important多设一个height和width5.FF:支持!important,IE则忽略,可用!important为FF特别设置样式6.div的垂直居中问题:vertical-align:middle;将行距增加到和整个D 阅读全文
posted @ 2011-12-06 21:57 逍遥メ风 阅读(703) 评论(0) 推荐(0) 编辑
摘要: Public Sub MakeButton()'动态生成一个按钮控件'动态生成事件'Dim i As IntegerDim strName As StringDim varstrName() As String Dim WSheet As Worksheet Dim MyNewbtn As OLEObject Dim Target As Range Dim ShtCodeName As String Dim linesCount As Long Set WSheet = Sheets("Sheet4") ShtCodeName = WSheet.Co 阅读全文
posted @ 2011-12-01 21:34 逍遥メ风 阅读(2005) 评论(0) 推荐(0) 编辑
摘要: View Code Sub GetSameValue()Dim arr(0)Dim i As Integer, cellval As Integer, tempval As IntegerDim varstr As Stringarr(0) = Array(9, 1, 4, 6, 1, 1, 1, 1)For i = 0 To UBound(arr(0)) cellval = arr(0)(i) If i = 0 Then tempval = cellval Else If cellval < tempval Then tem... 阅读全文
posted @ 2011-11-29 20:12 逍遥メ风 阅读(680) 评论(0) 推荐(0) 编辑
摘要: View Code Public Function GetColName(ByVal strAddress As String, ByVal Start As Integer) As String' Dim strAddress As String Dim endP As Integer' strAddress = ActiveCell.Address' endP = InStr(2, strAddress, "$") endP = InStr(Start, strAddress, "$") GetColName = SubStr 阅读全文
posted @ 2011-11-25 23:33 逍遥メ风 阅读(2795) 评论(0) 推荐(0) 编辑
摘要: '类模块---》添加类名为“CCB”的类,代码如下:Option ExplicitPrivate WithEvents m_CB As MSForms.CheckBox Private m_Form As WorksheetPublic Sub Init(ctl As MSForms.CheckBox, frm As Worksheet)Set m_CB = ctlSet m_Form = frmEnd SubPrivate Sub m_CB_Click()Dim KPIName As StringDim startNo As Long, endNo As LongDim objshe 阅读全文
posted @ 2011-11-16 20:39 逍遥メ风 阅读(633) 评论(0) 推荐(0) 编辑
摘要: 推荐认真看下老赵的ASP.NET MVC入门视频,老赵确实是牛人啊!!ASP.NET MVC框架开发系列课程http://www.microsoft.com/china/msdn/events/webcasts/shared/webcast/Series/MVC.aspx 阅读全文
posted @ 2011-11-16 13:16 逍遥メ风 阅读(341) 评论(0) 推荐(0) 编辑
摘要: Public Sub aa()Dim xc(1) As Variantxc(0) = Array(49, 132, 155)xc(1) = Array(146, 208, 80)RangeColorSort Sheets("Sheet1"), Sheets("Sheet1").Range("F2:F15"), Sheets("Sheet1").Range("F2:F15"), xcEnd SubPublic Sub RangeColorSort(sourceSheet As Worksheet, 阅读全文
posted @ 2011-11-07 21:46 逍遥メ风 阅读(995) 评论(0) 推荐(0) 编辑
摘要: 555 阅读全文
posted @ 2011-09-14 23:42 逍遥メ风 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 1、Option Explicit '强制对模块内所有变量进行声明Option Private Module '标记模块为私有,仅对同一工程中其它模块有用,在宏对话框中不显示Option Compare Text '字符串不区分大小写Option Base 1 '指定数组的第一个下标为 12、On Error Resume Next '忽略错误继续执行 VBA代码,避免出现错误消息3、On Error GoTo ErrorHandler '当错误发生时跳转到过程中的某个位置4、On Error GoTo 0 '恢复正常的错误提示5、App 阅读全文
posted @ 2011-08-13 00:21 逍遥メ风 阅读(3548) 评论(0) 推荐(0) 编辑
摘要: If ActiveCell.Text = "" Then Exit SubDim Startrowno As Integer, Startcolno As Integer, Endrowno As Integer, Endcolno As IntegerStartrowno = Target.RowStartcolno = Target.ColumnEndrowno = Target.Rows.Count + Startrowno - 1Endcolno = Target.Columns.Count + Startcolno - 1ActiveSheet.Name = &q 阅读全文
posted @ 2011-07-07 22:20 逍遥メ风 阅读(683) 评论(0) 推荐(0) 编辑