Help with spreasheet control functions

L

ltai0001

Hi
I would like to use the microsoft OWC control on an access form. I
include the control in the form and rename as "ctrl_Sheet". I cant
access the control basic functions line "cells(), Activesheet,......"
etc .... when I call it from within the onLoad function of the form.
I even tried this

Private Sub Form_Load()
Dim sht As OWC11.Spreadsheet

Set sht = Me.Controls("ctrl_Sheet")

sht.Cells(1, 1) = 1
End Sub

I get a type mismatch error.


I really appreciate any help here
 
A

Alvin Bruney [MVP]

You have to use script to program the controls. It is a client-side object.
 
L

ltai0001

You have to use script to program the controls. It is a client-side object.

Hi
Thank you for your answer
After trying, I ended up using this:

Set sht = Me.Controls("ctrl_Sheet").object


That way I was able to access the methods in VBA.
Youssef
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top