Sub Main()Dim K As Integer, L As Integer, N As Integer, M As Integer, I As Integer
Dim Temp As String, T As String, SS As Single
Dim ComePath As String, GoPath As String '文件路径
Dim FileHF As String '来报文件名
Dim Filemix As String '加上路径
Dim newfile As String ' 新文件
Dim Filename As String '加上路径的新文件Dim year As String
Dim tmpDate As Date, strFile As String, strTmp As String
Dim realtime As String, ineedtime As StringDim myFile As String
Dim myData As StringN = FreeFile
Open "autorain.cfg" For Input As #N
T = ""
Line Input #N, T
j = InStr(T, " ")
ComePath = T
T = ""
Line Input #N, T
j = InStr(T, " ")
GoPath = T
tmpDate = DateAdd("n", -0, Now()) '取当前的时间realtime = Format(tmpDate, "yyyymmddHHnn00")
year = Left(realtime, 4)ineedtime = Left(realtime, 11) + "000"myFile = Dir(ComePath & "\?????_2006" & ".txt")
Do Until myFile = ""
Open ComePath & "\" & myFile For Input As #1
myData = Input(LOF(1), 1)
Close #1
Open GoPath & "\china_200606281540" For Append As #1
Print #1, myData
Close #1 myFile = Dir()
Loop
end sub
----------------运行好象不行,后来有人把他保存为moudle,好象就可以了.他说我存的是窗体,所以不行? 那位知道究竟有什么区别?
Dim Temp As String, T As String, SS As Single
Dim ComePath As String, GoPath As String '文件路径
Dim FileHF As String '来报文件名
Dim Filemix As String '加上路径
Dim newfile As String ' 新文件
Dim Filename As String '加上路径的新文件Dim year As String
Dim tmpDate As Date, strFile As String, strTmp As String
Dim realtime As String, ineedtime As StringDim myFile As String
Dim myData As StringN = FreeFile
Open "autorain.cfg" For Input As #N
T = ""
Line Input #N, T
j = InStr(T, " ")
ComePath = T
T = ""
Line Input #N, T
j = InStr(T, " ")
GoPath = T
tmpDate = DateAdd("n", -0, Now()) '取当前的时间realtime = Format(tmpDate, "yyyymmddHHnn00")
year = Left(realtime, 4)ineedtime = Left(realtime, 11) + "000"myFile = Dir(ComePath & "\?????_2006" & ".txt")
Do Until myFile = ""
Open ComePath & "\" & myFile For Input As #1
myData = Input(LOF(1), 1)
Close #1
Open GoPath & "\china_200606281540" For Append As #1
Print #1, myData
Close #1 myFile = Dir()
Loop
end sub
----------------运行好象不行,后来有人把他保存为moudle,好象就可以了.他说我存的是窗体,所以不行? 那位知道究竟有什么区别?
解决方案 »
- 请各位帮帮忙,一个小问题,参数不可选的错误,怎么改好呢?
- vb用UPDATE后,怎么知道是否有数据有被更新过了呢?
- 关于连接DLL的问题
- 高手请进
- 弱智问题,不要见笑
- TheShelves.[_NewEnum],这样的符号表示什么意思啊!
- 如何让 Combobox 的下拉框始终打开?如何关闭?
- 求VBA连接数据库SybaseIQ的连接?谢谢
- 我的SQLSERVER2000服务起来不到,它说什么到期了,我该怎么办?我重新安装了也不行,难道SQL也要注册吗?各位帮帮我,一定给分
- 在VB中,怎么检查汉字的长度啊,比如,定义为10个字节的数据库最多只能输入5个汉字。
- 关于mshflexgrid控件固定列以及有了固定列后我选择某一行如何使整行都高亮显示的问题??急!
- 有关VSFlexGrid的问题?
放模块的话这个是启动这个如果放窗体里他运行不到窗体自动运行是formload