我想达到这样的效果,请问该怎么做??
就是想选择一个文件。
请问有什么现成的控件吗??
http://mp3.90pc.com/nn.jpg

解决方案 »

  1.   

    添加部件Microsoft Common Dialog Control 6.0
      

  2.   

    Microsoft Common Dialog Control 6.0
    好象不行啊。。
      

  3.   

    ComDialog.Flags = cdlOFNExplorer Or cdlOFNLongNames
      

  4.   

    我引用了Microsoft Common Dialog Control 6.0
    然后
    ComDialog1.Flags = cdlOFNExplorer Or cdlOFNLongNames
    运行没反应啊怎么办大哥??
      

  5.   

    On Error GoTo ErrHandler  With CommonDialog1
        .DialogTitle = "生成Excel"
        .FileName = "*.xls"
        .Filter = "(Excel)*.xls|*.xls"
        .CancelError = True
        .ShowOpen
      End With
      'CommonDialog1.FileName  得到打开文件的路径
      'CommonDialog1.FileTitle 得到打开文件的文件名
      
    ErrHandler:
      '用户按了“取消”按钮
      MsgBox "用户取消从Excel导出数据操作!", 48, "提示"
      Exit Sub