简体   繁体   English

使用 listview vb 6.0 导出 excel 中的数据

[英]exporting data in excel using listview vb 6.0

在此处输入图像描述

I'm new to vb 6.0 this is an existing project.我是 vb 6.0 的新手,这是一个现有项目。

Suddenly the hardisk was corrupt so i take backup form sever and run in new hard disk and when the project run there is no issue but when ctrl+F5 (compile) OR build exe get this error given below.突然硬盘损坏了,所以我从服务器上备份并在新硬盘上运行,当项目运行时没有问题但是当 ctrl+F5(编译)或构建 exe 时得到下面给出的错误。

Is there any reference missing or need to add是否有任何参考遗漏或需要添加在此处输入图像描述

You need to add a component Microsoft Windows Common Controls 6.0 (SP6) .您需要添加一个组件Microsoft Windows Common Controls 6.0 (SP6)

Go to Projects -> Components (Ctrl+ T) and check the checkbox for it. Go 到Projects -> Components (Ctrl+ T)并选中它的复选框。

项目 -> 组件

添加 Microsoft Windows 通用控件 6.0 (SP6)

Once this is added, you will also see extra components in the available GUI elements.添加后,您还将在可用的 GUI 元素中看到额外的组件。

新组件

Regarding the screenshot it looks like you have referenced both OCX Libraries关于屏幕截图,您似乎已经引用了两个 OCX 库

  • Microsoft Windows Common Controls 5.0 (SP2) - comctl32.ocx Microsoft Windows 通用控件 5.0 (SP2) - comctl32.ocx
  • Microsoft Windows Common Controls 6.0 (SP6) - mscomctl.ocx Microsoft Windows 通用控件 6.0 (SP6) - mscomctl.ocx

You can only use the ListSubItems collection with the Common Controls 6.0.您只能将ListSubItems集合与 Common Controls 6.0 一起使用。 If you want't to check which one is in use, you can open the.frm file in a TextEditor and search for the control name.如果不想检查正在使用的控件,可以在文本编辑器中打开 .frm 文件并搜索控件名称。 In front of the name you see either ComctlLib.ListView (5.0) or MSComctlLib.ListView (6.0)在名称前面,您会看到ComctlLib.ListView (5.0) 或MSComctlLib.ListView (6.0)

You can also try to change the Library in the TextEditor.您也可以尝试更改 TextEditor 中的库。 It worked with a sample project for me, but I'm not sure if there are properties used in your project that could break after the "switch" to the 6.0 controls.它适用于我的示例项目,但我不确定您的项目中使用的属性是否会在“切换”到 6.0 控件后中断。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM