Re: Inserted Excel Worksheet
I don't understand what you mean by "start the work sheet running."
Excel really doesn't start or stop, it just is.
Re: Inserted Excel Worksheet
Hi Hack
What i mean is to open or display the worksheet
Regards
SamF
Re: Inserted Excel Worksheet
Quote:
I've inserted from Insertable Objects Microsoft Excel Worksheet
I'm not sure what you are referring to here, is this something which is provided in the VB Editor (thus VBA) within an Office application? I can't find it in VB6.
Unfortunately without knowing what quite you are doing so far, we can't really help with the next steps.
Re: Inserted Excel Worksheet
Dear Si The geek
Go to the menu PROJECTS
click on Components
and select Insertable Objects
and Tick on Microsoft Excel Worksheet
Then in the ToolBox Icon of Excel SHEET will display.
This Sheet Icon i drag and place it to the Form
So i've have a text box whre i want to enter the data and the same data
should be displayed in the Excel Sheet Cell (2,1)
Regards
Sam F
Re: Inserted Excel Worksheet
Any one
Private Sub Sheet1_Validate(Cancel As Boolean)
'What do i write in
End Sub
Private Sub Sheet1_GotFocus()
'What do i write in
End Sub
Basically when the Form is loaded
This Excel Worksheet should be opened
Why Do i have to click on Sheet1 twice
Why it cannot open on the form by itself.
Regards
SamF
Re: Inserted Excel Worksheet
I had a bit of a play around, but I can't find any way to actually reference the sheet (or workbook etc) with that method.
What you could do instead (if you want to keep it inside your form) is use the OLE control, set the Class to Excel.Sheet , and then use code like this:
Code:
'OLE1.object is equivalent to a WorkBook
OLE1.object.sheets(1).Cells(2, 1) = "hello"
..or if you want to do multiple things with it, like this:
Code:
With OLE1.object.sheets(1)
.Cells(2, 1) = "hello"
.Cells(2, 2) = "more text"
...
End With
If you are willing to have Excel run as a separate application to your program, see the Excel Tutorial link in my signature.
Re: Inserted Excel Worksheet
How do i load these OLE contorl ?
Regards
SamF
Re: Inserted Excel Worksheet
ole control is in the standard controls toolbox