代码改变世界

vba 设置坐标轴

2016-07-11 18:42 by sylar_liang, 2330 阅读, 0 推荐, 收藏, 编辑
摘要:1.辅助线虚线 ActiveSheet.ChartObjects("图表1").Activate ActiveChart.Axes(xlValue).Select ActiveChart.Axes(xlValue).MajorGridlines.Select With Selection.Forma 阅读全文

vba 更新折线图上显示内容

2016-07-01 10:34 by sylar_liang, 623 阅读, 0 推荐, 收藏, 编辑
摘要:Dim nCount As integer nCount = ActiveSheet.ChartObjects.count //当前工作表有多少个图表 //更新规格线显示的内容 Dim chartName As string chartName = "规格: " & Cells(iRow, "E") 阅读全文

vba 数据更新

2016-06-27 14:09 by sylar_liang, 947 阅读, 0 推荐, 收藏, 编辑
摘要:Sub 更新数据1_Click() '1.获取单个文件 Dim strFile As string strFile = GetSingleFileName If strFile = "" Then Exit Sub End if '2.打开单个文件 Application.DisplayAlerts 阅读全文

vba 判断是否为数字

2016-06-13 17:59 by sylar_liang, 7631 阅读, 0 推荐, 收藏, 编辑
摘要:1.先设置单元格为 保留2位小数。 2.判断单元格内容 Dim line1 as single Dim line2 as single If Cells(2,2).Value = "" Then line1 = 0 Else if Not IsNumeric(Cells(2, 2).Text) Th 阅读全文

SQL Server 发生错误:1807

2016-06-13 14:26 by sylar_liang, 583 阅读, 0 推荐, 收藏, 编辑
摘要:SQL Server 不能创建数据库了,发生错误:1807 未能获得数据库'model'上的排它锁。请稍后重试操作。 解决: declare @sql varchar(100) while 1=1 begin select top 1 @sql = 'kill '+cast(spid as varc 阅读全文

VBA编程学习笔记

2016-06-12 11:05 by sylar_liang, 235 阅读, 0 推荐, 收藏, 编辑
摘要:1.Range("B2:LastCell"),其中LastCell为已定义的单元格区域名称。 2.Sheet7.Range("A5").CurrentRegion.Select 当前区域是一个边缘是任意空行和空列组合成的范围。 阅读全文

设置Range格式为数字

2016-06-08 09:27 by sylar_liang, 582 阅读, 0 推荐, 收藏, 编辑
摘要:Range("D13:O19", C13, C14).Select Selection.NumberFormatLocal = “0.00_” Range("D" & (iRow+2) & ":O" & (iRow+8) & ",C" & (iRow + 2) & ",C" & (iRow + 3) 阅读全文

创建图表

2016-06-07 18:04 by sylar_liang, 412 阅读, 0 推荐, 收藏, 编辑
摘要:Dim myRange As Range Dim myChart As ChartObject If ActiveSheet.ChartObjects.count > 0 Then Sheet1.ChartObjects.Delete End if Set ab = Range("A1:O10") 阅读全文

vba 去除数组重复数据

2016-06-06 13:53 by sylar_liang, 3849 阅读, 0 推荐, 收藏, 编辑
摘要:Dim intArr() Dim strL As string Dim BB As new Collection for i = LBound(varFileList) To UBound(varFileList) strTemp1 = varFileList(i) strL = Mid(strTe 阅读全文

WM_PAINT

2016-05-26 21:03 by sylar_liang, 564 阅读, 0 推荐, 收藏, 编辑
摘要:WM_PAINT: BeginPaint(hWnd, &ps); 其中: ps 为 typedef struct tagPAINTSTRUCT { HDC hdc; //设备环境句柄 BOOL fErase; RECT rcPaint; ... } 主要是前3个参数设置。 bErase大多数情况下被 阅读全文
上一页 1 2 3 4 5 6 ··· 13 下一页