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...
need Help in excel using Vb 6.0How to generate dynamically Combobox in excel using vb 6.0
Page 1 of 1
3 Replies - 3796 Views - Last Post: 01 September 2008 - 06:49 PM
Replies To: need Help in excel using Vb 6.0
#2
Re: need Help in excel using Vb 6.0
Posted 26 August 2008 - 06:07 AM
#3
Re: need Help in excel using Vb 6.0
Posted 26 August 2008 - 08:56 PM
wat i mean is ...i want 100 combo boxes row after row in one particular column.
Hope i am clear now.
Hope i am clear now.
#4
Re: need Help in excel using Vb 6.0
Posted 01 September 2008 - 06:49 PM
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 :
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 :
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 :
That is like the code in the previous example. We refer to the cell by writing the syntax like that :
2. The second by writing :
This is like the code in the previous example. we refer to the cell by writing the syntax like that :
But I don't know if whether we can write a Formula in the Cell by this syntax or not.
First, Excel object library must be refernced, then write this 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 :
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 :
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 :
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 :
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 :
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.
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote





|