LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Visual basic linkup with Excel

I created a form in Visual Basic

In that form i have two Text Box (Name & Address) and a Command Button.


Now i want that whenever the user enters the details in the Text Box it
should update the Excel File.

i am using the following codes

Private Sub cmdOk_Click()
Dim object1 As Excel.Application
Set object1 = CreateObject("excel.application")
object1.Workbooks.Open App.Path & "\TEST.xls"
Set object3 = object1.ActiveSheet
object1.Visible = True

object1.ActiveSheet.Cells(1, 1).Value = Text1.Text
object1.ActiveSheet.Cells(1, 2).Value = Text2.Text

'object1.ActiveWorkbook.Save
'object1.ActiveWorkbook.Close
'object1.Quit
End Sub


but everytime when i am clicking on the Save Button its opening the new
workbook with read only options.

I want that it should update the same excel present in the folder
everytime and in new row.

moreover i want that no one shuld leave the empty text box. If left
then it shoud not allow it to save it.

How to do it.

Pls help.

Regards

Akash

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is Visual Basic the same as Visual Studio 2008? Mike Stewart Excel Worksheet Functions 5 January 11th 09 04:58 PM
Visual BASIC in Excel Emerogork via OfficeKB.com Excel Worksheet Functions 1 August 27th 07 04:53 PM
Make visual basic truely visual! GraphicalGuy Excel Programming 0 October 20th 06 05:53 PM
Can I run Visual Basic procedure using Excel Visual Basic editor? john.jacobs71[_2_] Excel Programming 3 December 26th 05 02:22 PM
changing the visual basic in office 2003 to visual studio net bigdaddy3 Excel Discussion (Misc queries) 1 September 13th 05 10:57 AM


All times are GMT +1. The time now is 07:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"