
VBA
YoungHappyGIS
唯有脚踏实地,才敢仰望星空! ArcEngine开发部落QQ群:465249769
展开
-
VBA文件对话框的应用(VBA打开文件、VBA选择文件、VBA选择文件夹)
转载链接:http://blog.sina.com.cn/s/blog_54b09dc90100qbsp.html在VBA中经常要用到文件对话框来进行打开文件、选择文件或选择文件夹的操作。用Microsoft Office提供的文件对话框比较方便。用法如下Application.FileDialog(fileDialogType)fileDialogType MsoF转载 2014-05-14 19:42:20 · 19069 阅读 · 0 评论 -
vba 创建文件夹 判断文件夹是否存在
If Dir(App.Path & "\Database", vbDirectory) = "" Then MkDir (App.Path & "\Database") End ifIf Dir(App.Path & "\Database\a", vbDirectory) = "" Then MkDir (App.Path & "\Database\a") End if原创 2014-05-16 13:15:52 · 9134 阅读 · 0 评论 -
VBA 字符串处理函数集
转自:http://blog.youkuaiyun.com/jyh_jack/article/details/2315345mid(字符串,从第几个开始,长度) 在[字符串]中[从第几个开始]取出[长度个字符串] 例如 mid("小欣无敌",1,3) 则返回 "小欣无"instr(从第几个开始,字符串1,字符串2) 从规定的位置开始查找,返回字符串2在字符串1中的位置 例如 instr(1,转载 2014-05-16 11:10:37 · 905 阅读 · 0 评论 -
ArcGIS VBA 标注选定的要素
Function LabelSelectedFeatures(pLayer As ILayer, pFeature As IFeature) Dim pGeoFeatureLayer As IGeoFeatureLayer Dim pLabelEngine As ILabelEngineLayerProperties Dim pAnnoProperties As IA原创 2014-05-16 13:18:37 · 2046 阅读 · 0 评论 -
VBA笔记 退出循环、Sub、Fuction等的Exit语句
Exit语句,可以用来跳出、退出各种循环。以下是几种VBA循环及过程、函数等的退出语句代码。 一、For循环的退出 For Each myCell in Range("A1:H10") If myCell.Value = "" Then myCell.Value = "empty" Else Exit For En转载 2014-05-16 13:20:02 · 35521 阅读 · 0 评论 -
ArcGIS VBA 打开文件对话框 OpenFileDialog
Private Sub CommandButton2_Click() Dim pGxdial As IGxDialog Set pGxdial = New GxDialog pGxdial.ButtonCaption = "保存路径" pGxdial.Title = "打开" pGxdial.RememberLocation = True原创 2014-05-16 13:31:27 · 2193 阅读 · 0 评论