摘要: 一直想着能通过程序直接指定各种数据的类型,但一直没有实现,因为以前实现起来比较麻烦,今天上午有了一点头绪,整理如下:通过在VBA中运行format函数与numberformat、numberformatlocal等,感觉如果涉及到日期型数据,用format函数方便些,如果涉及到比如小数点后取两位的情况用numberformatlocal属性更好些。关于如果转换日期型数据的格式,举例如下:Cells(1, 1).Value = "2010年5月1日" 注:先给定个样式,以便于下面进行各种验证。⑴Cells(1, 2).Value = Format(Cells(1, 1).Va 阅读全文
posted @ 2010-03-24 12:08 surfacetension 阅读(745) 评论(0) 推荐(0) 编辑