473,614 Members | 2,101 Online
Bytes | Software Development & Data Engineering Community
+ 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.. plzzzzzzzzzzzzz z :(

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 4452
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
2775
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
4792
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
2187
by: christine0207 | last post by:
Hi, how to generate a fixed length data text file using Scripting.TextStream / filesystemobject.
3
3458
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 knowledge document of that application resides. App1 \\server\documents\App1.doc
2
1763
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
2533
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
3128
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(); dd.SetData(DataFormats.Text,"\\\\ws-it-bstough\\ShareFolder\\Test.wav"); DoDragDrop(dd,DragDropEffects.Copy); The code works as expected but it will always populate into Excel as a string literal and not as a link to the audio file. If I type the path into a excel the link appears correctly. I am...
0
1087
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 can think of is to iterate each column within a row but maybe there's other way. Hope you can help me guys. Thanks
2
3945
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
10401
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 data by using ASP.NET, ADO.NET, and Visual C# .NET I am trying with the same code in Visual Studio 2005 in ASP.NET application. The code i am using is: protected void Page_Load(object sender, EventArgs e) { String connectionString...
0
8176
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8620
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8571
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8265
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
7047
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6085
isladogs
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4048
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4115
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1420
bsmnconsultancy
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.