473,396 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How i can control an Excel worksheet by VB 6.0

I have an excel worsheet and its divided into 7 Columns and 35 rows
and i want to design an VB project wich have 8 text boxes & one command button
one textbox to put a string value in it to search the excel worksheet by clicking a command button ........ when the needed value is found the vb project fillup the other 7 text boxes with the values of the other rows
if there any one can help me with that..plz
Jan 13 '07 #1
4 4802
Killer42
8,435 Expert 8TB
I have an excel worsheet and its divided into 7 Columns and 35 rows
and i want to design an VB project wich have 8 text boxes & one command button
one textbox to put a string value in it to search the excel worksheet by clicking a command button ........ when the needed value is found the vb project fillup the other 7 text boxes with the values of the other rows
if there any one can help me with that..plz
How rigid are these requirements? For example...
  • Does it have to be a VB6 project, or could you use an Excel macro?
  • Does the information have to be in a spreadsheet?
Jan 13 '07 #2
How rigid are these requirements? For example...
  • Does it have to be a VB6 project, or could you use an Excel macro?
  • Does the information have to be in a spreadsheet?

Yes it must be a VB project cauz my study within it
and they dont have to be in spreadsheet ...... any way will be helpful.


Thanks in advance
Jan 14 '07 #3
willakawill
1,646 1GB
I have an excel worsheet and its divided into 7 Columns and 35 rows
and i want to design an VB project wich have 8 text boxes & one command button
one textbox to put a string value in it to search the excel worksheet by clicking a command button ........ when the needed value is found the vb project fillup the other 7 text boxes with the values of the other rows
if there any one can help me with that..plz
This is relatively easy if you already know how to use automation in your vb project. If you don't already know then you have a lot to learn to get this project to work.

You need to add excel to your list of references so that you can declare variables that refer to an excel workbook. This is quite a lengthy topic to cover here so you might consider doing a google search for 'vb excel automation'

You can also find a code sample here
Jan 15 '07 #4
This is relatively easy if you already know how to use automation in your vb project. If you don't already know then you have a lot to learn to get this project to work.

You need to add excel to your list of references so that you can declare variables that refer to an excel workbook. This is quite a lengthy topic to cover here so you might consider doing a google search for 'vb excel automation'

You can also find a code sample here

this code below is all what I got

Private Sub searchbtn_Click()
Dim exelAPP As Excel.Application
Dim exelbook As Excel.Workbook
Dim exelsheet As Excel.Worksheet

Set exelAPP = New Excel.Application
Set exelbook = oXL.Workbooks.Open("d:\d.xls")
Set exelsheet = oWB.Worksheets("Sheet1")
exelsheet.Range("b3", "b34").FindNext (t1.Text) ' i suppose this will search the worksheet of the specefied word

End Sub


then what???!!! when the specefied word is found ..how can i paste the other values of the same row in the other 7 text boxes??????
i dont have any idea how to make the project going ok
Thanks to all
Jan 15 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
1
by: c duden | last post by:
Excel won't allow documents to be linked to a worksheet in office 2000 when using C# to create an add-in. The following code snippets are what was used in the attempts (there are more...
1
by: mail2atulmehta | last post by:
Hi, I do not know if this is right place for this, but i need some help. I have a text file, whose values are seprated by a delimiter. I want to open this file in excel, ( not import it) . I have...
0
by: dgoel | last post by:
Hi, I Have a text file & I want to open it in excel sheet ( withou importing). I have written code for it, but it is not opening exce sheet. It opens the text file, but does not create a excel...
1
by: javzxp | last post by:
Hi I'd like to use C# to open an existing Excel workbook and save each worksheet it contains into a new Excel file. The name of each new Excel file should be the name of the worksheet copied...
8
by: Sam | last post by:
Hi All, I posted this message few days ago. No one has answered so far. I just would like to know if it is possible to do or not. Even if you can not tell me how to do this, maybe you know which...
1
by: Randall Arnold | last post by:
I'm converting a vbscript program to vb.net. Witht he exception of .net idiosyncrasies, most of it is working well with the same code. My only problem is that some properties and methods are...
6
by: gumbystation | last post by:
I am looking to take data from an excel spreadsheet into a csharp application to manipulate the data in various ways. Currently, I am using VS2005 (self-taught C#) and Excel 2000. I have...
3
by: sejal17 | last post by:
hello Can any one tell me how to read multiple worksheets from a single excel file.I have stored that excel in xml file.so i want to read that xml that has multiple worksheet.And i want to store...
3
by: sejal17 | last post by:
hello Can any one tell me how to read multiple worksheets from a single excel file.I have stored that excel in xml file.so i want to read that xml that has multiple worksheet.And i want to store...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.