Spreadsheet 9.0 Control

M

mohsen

Hello, Here is a question:
I have a very complicated worksheet, with about twenty or so sheets.
It's really hard, unless you are familiar with the logic to follow the
instructions on how to fill these sheets out. So, I decided to create a
wizard, where the end user is walked through the various sheets. I wrote
the code in a form housing a spreadsheet control, each time the user
clicks on "Next" or "Back" the spreadsheet control is updated with the
next or previous worksheet. Here is the code I am using to get the data
from excel worksheet and display it in the spreadsheet control:
Worksheets(myworksheet).Range("A1", "M200").Copy
Spreadsheet1.ActiveSheet.Range("A1").Paste

It works beautifully.... But when I try to do the reverse, I get error
438, the object does not support this property.
Spreadsheet1.ActiveSheet.Range("A1", "M200").Copy
Worksheets(myworksheet).Range("A1").Paste

Anyone with any ideas, please....
Mohsen
 
N

Nick Hebb

Paste is a method of the Worksheet object, so I'm surprised the first
copy/paste worked.

Try:

Spreadsheet1.ActiveSheet.Range("A1", "M200").Copy
Worksheets(myworksheet).Paste Destination:=Range("A1")
 
M

Mohsen Shabanian

Thanks. I will try this. Is there a place where the spreadsheet control
9.0 is documented. Thanks.
 

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