http://www.csdn.net/expert/topic/889/889073.xml?temp=.9965937
在此帖子上有许多比较高深的问题,如果你觉得你的技术还不错,帮 我看看吧
相信如果学会的话你也会进步的

解决方案 »

  1.   

    private sub form_load()
    randomize()
    print cint(9*rnd+1)
    end sub
      

  2.   

    1.randomize()初始化随机数生成器
    2.先用kill删除已存在的文件,再拷贝
      

  3.   

    1.randomize()函数
    2.变通处理以下
      dim rtn as long
      if dir$(file12)<>"" then
         rtn=MsgBox("要覆盖现有文件吗?",vbyesno)
         if rtn=vbyes then
            kill file2
            copyfile file1,file2
         end if
      end if  另外,可以用File对象的Copy方法,FileSystemObject的FilecCopy方法实现。
      

  4.   

    sub Form_load()     randomize()'初始化随机数生成器     print cint(9*rnd+1))
      end sub
      

  5.   

    不好意思,有笔误:
    copyfile file1,file2 -> FileCopy file1,file2
    FileSystemObject的FilecCopy方法 -> FileSystemObject的CopyFilec方法
      

  6.   

    Dim fso As New FileSystemObject
    fso.CopyFile "xxx", "xxx", True