How i can control an Excel worksheet by VB 6.0 | Bytes (2024)

hamoraby

How i can control an Excel worksheet by VB 6.0 | Bytes (1) 3 New Member

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

Subscribe Reply

4 How i can control an Excel worksheet by VB 6.0 | Bytes (2) 4806 How i can control an Excel worksheet by VB 6.0 | Bytes (3)

Killer42

8,435 How i can control an Excel worksheet by VB 6.0 | Bytes (4) Recognized Expert Expert

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

reply

hamoraby

3 How i can control an Excel worksheet by VB 6.0 | Bytes (5) New Member

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

reply

willakawill

1,646 How i can control an Excel worksheet by VB 6.0 | Bytes (6) Top Contributor

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

reply

hamoraby

3 How i can control an Excel worksheet by VB 6.0 | Bytes (7) New Member

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.Applicati on
Dim exelbook As Excel.Workbook
Dim exelsheet As Excel.Worksheet

Set exelAPP = New Excel.Applicati on
Set exelbook = oXL.Workbooks.O pen("d:\d.xls")
Set exelsheet = oWB.Worksheets( "Sheet1")
exelsheet.Range ("b3", "b34").Find Next (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

reply

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

Similar topics

13 35502

Open MS Excel Spreadsheet with Python

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 and extract information from specific worksheets and cells. I'm not really sure how to get started with this process. I ran the COM Makepy...

Python

1 3748

Excel OLE linking

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 permutations of parameters, but for brevity...): // one - based on code from Matt Reynolds' website Excel.Worksheet active =...

.NET Framework

1 4671

reading from text file to excel file

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 written the driver prg in c#. The code opens the file, but it is not writting the values from text file into excel file. I can not figure out the...

C / C++

2839

populate a excel sheet from text file

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 sheet populate it. I do not know what the problem is, can someone please hel out with this one, Here is my code: StreamReader dataFileReader = null;...

C# / C Sharp

1 10732

Save each sheet in an Excel workbook to separate files

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 from the existing file. So, as an example:

C# / C Sharp

8 788

Excel

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 library I need to use in order to access excel information from a VB.NET code. For example, I would be interested by knowing how to access a simple...

Visual Basic .NET

1 2560

missing Excel 2000 properties and methods

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 missing from the Chart object. For instance, the following line worked fine in vbscript (csPowerSpeed is the chart): ...

Visual Basic .NET

6 14803

CSharp and Excel

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 researched into using the Excel.Application object and have successfully openned a worksheet in Excel (though hidden from the user). The problem now...

C# / C Sharp

3 6230

How to read multiple worksheet from a single excel file

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 that multiple worksheet data in different table.How can i do it.Below is my xml file. <?xml version="1.0"?> <Workbook...

PHP

3 5372

how to read multiple worksheet from an excel file using php

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 that multiple worksheet data in different table.How can i do it.Below is my xml file. <?xml version="1.0"?> <Workbook...

XML

7506

Changing the language in Windows 10

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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...

Windows Server

1 7541

The easy way to turn off automatic updates for Windows 10/11

by: Hystou |last post by:

Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...

Windows Server

7872

Discussion: How does Zigbee compare with other wireless protocols in smart home applications?

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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...

General

1 5423

Access Europe - Using VBA to create a class based on a table - Wed 1 May

by: isladogs |last post by:

The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...

Microsoft Access / VBA

5142

Couldn’t get equations in html when convert word .docx file to html file in C#.

by: conductexam |last post by:

I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...

C# / C Sharp

3545

Trying to create a lan-to-lan vpn between two differents networks

by: TSSRALBI |last post by:

Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...

Networking - Hardware / Configuration

3533

Windows Forms - .Net 8.0

by: adsilva |last post by:

A Windows Forms form does not have the event Unload, like VB6. What one acts like?

Visual Basic .NET

1 1114

How to add payments to a PHP MySQL app.

by: muto222 |last post by:

How can i add a mobile payment intergratation into php mysql website.

PHP

823

Comprehensive Guide to Website Development in Toronto: Expert Insights from BSMN Consultancy

by: bsmnconsultancy |last post by:

In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

General

How i can control an Excel worksheet by VB 6.0 | Bytes (2024)
Top Articles
Latest Posts
Article information

Author: Amb. Frankie Simonis

Last Updated:

Views: 5777

Rating: 4.6 / 5 (76 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Amb. Frankie Simonis

Birthday: 1998-02-19

Address: 64841 Delmar Isle, North Wiley, OR 74073

Phone: +17844167847676

Job: Forward IT Agent

Hobby: LARPing, Kitesurfing, Sewing, Digital arts, Sand art, Gardening, Dance

Introduction: My name is Amb. Frankie Simonis, I am a hilarious, enchanting, energetic, cooperative, innocent, cute, joyous person who loves writing and wants to share my knowledge and understanding with you.