VB操作Excel信息录入与查询

前端之家收集整理的这篇文章主要介绍了VB操作Excel信息录入与查询前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

为了理解VB具体如何操作Excel,包括创建,打开,写入,读取等基本操作,闲暇之余编写测试,在此留以备用。

I.VB创建Excel表:

II.VB打开Excel表:

III.VB关闭Excel表:

IV.VB写入Excel表:

V.VB读取Excel表:

VB操作Excel足彩信息录入与查询
创建VB应用程序,文件->新建工程->标准EXE,确认。

应用程序源码

附表,添加控件,如下:

CommandButton控件
btnShow
btnAdd
btnSearch

ComboBox控件
comboDate
comboCompany
comboHome
comboGuest

Frame控件
frmInfo

ListBox控件
lstInfo

Label控件
lblDate
lblCompany
lblHome
lblHomescore
lblGuestscore
lblguest
lblEroupPreWin
lblEroupPreDraw
lblEroupPreLose
lblEroupFinalWin
lblEroupFinalDraw
lblEroupFinalLose
lblHomePreWin
lblPreDraw
lblGuestPreWin
lblHomeFinalWin
lblFinalDraw
lblGuestFinalWin
lblPanlu
lblInfo
lblSearch
lblSearchInfo
lblSearchDate
lblSearchCompany
lblSearchHome
lblSearchGuest

TextBox控件txtDatetxtCompanytxtHometxtHomescoretxtGuestscoretxtguesttxtEroupPreWintxtEroupPreDrawtxtEroupPreLosetxtEroupFinalWintxtEroupFinalDrawtxtEroupFinalLosetxtHomePreWintxtPreDrawtxtGuestPreWintxtHomeFinalWintxtFinalDrawtxtGuestFinalWintxtPanlu

猜你在找的VB相关文章