OWC Spreadsheet Control

A

a7n9

Hello all,

I'm trying to populate a spreadsheet OWC control in a Form, but I'm getting
a Type mismatch error. Any help is appreciated.

here's the code:
Dim owcSpredSht As OWC11.Spreadsheet
Dim owcWrkBk As OWC11.Workbook
Dim owcWSht As OWC11.Worksheet

Set owcSpredSht = Me.Spreadsheet7
Set owcWrkBk = owcSpredSht.ActiveWorkbook
Set owcWSht = owcWrkBk.ActiveSheet

I'm getting an error when I'm trying to set the variable owcSpredSht with
the control.
 
D

Douglas J. Steele

Assuming Me.Spreadsheet7 is a spreadsheet control, you shouldn't really need
to instantiate owcSpredSht. Try simply using

Set owcWrkBk = Me.Spreadsheet7.ActiveWorkbook
Set owcWSht = owcWrkBk.ActiveSheet
 

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