Categories
- AI (1)
- Artificial Intelligence (1)
- Best parental control software (1)
- Excel Tips (1)
- Folding Paper (1)
- free web space (1)
- Google SketchUp (1)
- high speed internet (1)
- JAVA (1)
- Leaders History (1)
- Origami (1)
- Paper ARt (1)
- Paperfolding (1)
- ROBOT (1)
- sponsored links (1)
- tata nano (1)
- Technology (1)
- utility (2)
- Visual Basic (1)
9:12 AM
2.Create a new ms-acess database with name eduplusand create table SMASTER containing datas of (sno:autonumber,sname:text,age:number) and save this database in desktop name eduplus.
3. Create Data Controal in forms and click F4 Function Key
4. from this Properities Select Database : select ur database(eduplus from desktop)
and select record source and select SMASTER TABLE
4.Goto the Project menu and click Reference and select Microsoft Excel 11.0(this 11.0 defend upon ur Ms-office iam using msoffice 2003).
4. Create "sales.XLS" In excel and save it to "C:\" .
5.Create Command Button and write the following code in command1_click event.
Private Sub Command1_Click()
Dim app As Excel.Application
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet
Set app = CreateObject("Excel.Application")
Set wb = app.Workbooks.Open("c:\sales.xls")
Set ws = app.Sheets(1)
ws.Cells(1, 1) = "SNO"
ws.Cells(1, 2) = "SNAME"
ws.Cells(1, 3) = "AGE"
Row = val(2)
While Not Data1.Recordset.EOF
ws.Cells(Row, 1) = Data1.Recordset.Fields(0)
ws.Cells(Row, 2) = Data1.Recordset.Fields(1)
ws.Cells(Row, 3) = Data1.Recordset.Fields(2)
Row = Val(Row) + Val(1)
Data1.Recordset.MoveNext
Wend
wb.Save
wb.Close
app.Quit
Set app = Nothing
End Sub
copy and paste the code between
Private Sub Command1_Click()
.
.
.
.
End Sub
Run the Programme......................
Labels: Visual Basic