473,466 Members | 1,296 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

saving data from a text box to excel using VB 6.0

1 New Member
on execution, i get a blank space only on the cell where my text box data has to be saved... plzzzzzzzzzzz help me.. plzzzzzzzzzzzzzz :(

my code is below
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.    Dim oExcel As Object
  3.    Dim oBook As Object
  4.    Dim oSheet As Object
  5.  
  6.    'Start a new workbook in Excel
  7.    Set oExcel = CreateObject("Excel.Application")
  8.    Set oBook = oExcel.Workbooks.Add
  9.  
  10.    'Add data to cells of the first worksheet in the new workbook
  11.    Set oSheet = oBook.Worksheets(1)
  12.    oSheet.Range("A1").Value = "Name"
  13.    oSheet.Range("B1").Value = "Time"
  14.    'oSheet.Range("A1:B1").Font.Bold = True
  15.    oSheet.Range("A2").Value = Text5.Text
  16.    oSheet.Range("B2").Value = "John"
  17.  
  18.    'Save the Workbook and Quit Excel
  19.    oBook.SaveAs "C:\Book1.xls"
  20.    oExcel.Quit
  21.  
  22. End Sub
Jun 4 '12 #1
1 4398
PsychoCoder
465 Recognized Expert Moderator Contributor
This is the VB.NET forum, moving to Visual Basic 4/5/6 forum
Jun 4 '12 #2

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

Similar topics

1
by: duha | last post by:
Dear All, how I can read data from excel file using php I want convert some data which stored in Excel file to mysql using PHP Regards Duha
1
by: winmani | last post by:
hi buddies, cud u explain, how to retrieve data from excel file and save into oracle database using vb.net.
1
by: christine0207 | last post by:
Hi, how to generate a fixed length data text file using Scripting.TextStream / filesystemobject.
3
by: balazee | last post by:
Hi, I’ve some data in an excel sheet which needs to be displayed in an html page as lists. For example, In the excel I’ve the below details like, the application name and the path where the...
2
by: VENKATAKRISHNA | last post by:
i want to read data from excel using c and use tht data for further excecutation in my code how can i do it
1
by: vijaymohan | last post by:
Hi ..I am very new to perl..can some one help me with this script pls.. I am Querying database and writing data to excel.. Here is my script: #!/usr/bin/perl -w use strict; use DBI;
8
by: Bruce_Stough | last post by:
I am currently using Control.DoDragDrop to drop a text string into Excel. I use the following code DataObject dd = new DataObject();...
0
by: romcab | last post by:
Hi guys, I would like to ask how can I get an entire row of data in excel using .net? right now what I can retrieve is 1 column but what I want is all of the column on the entire row. What I...
2
by: ranjiths | last post by:
hi, i am trying to export data to excel from html using javascript, but i am getting an error as it opens saveas window. Please do the needful
1
by: =?Utf-8?B?U2hlZXMgQWJpZGk=?= | last post by:
I read an article on the link: http://support.microsoft.com/default.aspx?scid=kb;en-us;306572 related to reading data from Excel using OLEDB The topic's heading is: How to query and display excel...
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
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...
1
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...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.