Welcome to Dream.In.Code
Getting VB Help is Easy!

Join 136,299 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 2,471 people online right now. Registration is fast and FREE... Join Now!




need Help in excel using Vb 6.0

 
Reply to this topicStart new topic

need Help in excel using Vb 6.0, How to generate dynamically Combobox in excel using vb 6.0

umeshshivakanth
26 Aug, 2008 - 04:09 AM
Post #1

New D.I.C Head
*

Joined: 24 Apr, 2008
Posts: 18

Suppose i want 100 combo boxes in one particular column, how to generate it dynamically using vb6.0 in excel sheets and population of combo boxes with true or false option...Plz help...
User is offlineProfile CardPM
+Quote Post

dineeshd
RE: Need Help In Excel Using Vb 6.0
26 Aug, 2008 - 05:07 AM
Post #2

D.I.C Addict
Group Icon

Joined: 30 Jun, 2008
Posts: 578



Thanked: 16 times
Dream Kudos: 575
My Contributions
QUOTE(umeshshivakanth @ 26 Aug, 2008 - 05:39 PM) *
i want 100 combo boxes in one particular column

Are you sure? Why you want 100 Combo Boxes in one Column? Normally one column should contain one kind of data. So one combobox should do the job for you. Or you are trying to say something else?
User is offlineProfile CardPM
+Quote Post

umeshshivakanth
RE: Need Help In Excel Using Vb 6.0
26 Aug, 2008 - 07:56 PM
Post #3

New D.I.C Head
*

Joined: 24 Apr, 2008
Posts: 18

wat i mean is ...i want 100 combo boxes row after row in one particular column.
Hope i am clear now.

User is offlineProfile CardPM
+Quote Post

georgewba
RE: Need Help In Excel Using Vb 6.0
1 Sep, 2008 - 05:49 PM
Post #4

New D.I.C Head
*

Joined: 4 Jul, 2008
Posts: 6


My Contributions
This is the code for creating an excel workbook and excel worksheets and how to write anything in the sheet :
First, Excel object library must be refernced, then write this code :
CODE

Dim objExcel as Excel.Application
Set objExcel = New Excel.Application
objExcel.Visible = True
ObjExcel.SheetsInNewWorkbook = 1
ObjExcel.Workbooks.Add

This is the code for crearting an excel workbook and excel worksheets . In this part we create an excel workbook. we set how many worksheets we want in the workbook in the forth line.

The following code is for writing in the active worksheet :
CODE

with objExcel.ActiveSheet
      .Cells(1, 2).Value = "10"
      .Cells(2, 2).Value = "20"
      .Cells(3, 2).Value = "SUM(B1:B2)"
      .Range("A3")= "Total"
End With

In this part we write in the active worksheet what we want. We refer to the cell with two methods :
1. The first method by writing :
CODE

objExcel.ActiveSheet.Cells(1, 2).Value = The Text or the Formula we want , like that in Line4 in the previous example, we want to write

That is like the code in the previous example. We refer to the cell by writing the syntax like that :
CODE

objExcel.ActiveSheet.Cells([b][i]The number of the Row[/i][/b],[b][i] The number of the Column[/i][/b]).Value = The Text we want to write


2. The second by writing :
CODE

objExcel.ActiveSheet.Range("A3") = The Text we want to write

This is like the code in the previous example. we refer to the cell by writing the syntax like that :
CODE

objExcel.ActiveSheet.Range([b][i]The Name of the Cell in the Excel WorkSheet[/i][/b]) = The Text we want to write

But I don't know if whether we can write a Formula in the Cell by this syntax or not.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 06:17AM

Live VB Help!

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month