PDA

Click to See Complete Forum and Search --> : Getobject from ole?


shanp
Dec 28th, 2000, 03:36 AM
My problem is
I want to enter the values from the textbox to the already existing xlbook say "C:\STOCK.XLS"
How to add the following code in the xlbook.
Xlsheet.cells(2,1)=text1.text


Private Sub Form_Load()
Set xlBook = GetObject("C:\STOCK.xls")
' Display Microsoft Excel and the Worksheet
' window.
xlBook.Application.Visible = True
xlBook.Windows(1).Visible = True
End Sub

samwise
Jan 4th, 2001, 05:36 PM
To enter a value (Text1.text) into
Column 'A'
Row '8'
Worksheet '1'
use the following
xlBook.Worksheets(1).Range("C8").value = Text1.text

Does this work?

Samwise Galenorn
sam@galenorn.com