OWC Paste / Undo issue

D

Dhananjay

Hi all,
I am using OWC control in my access project. I don't want to allow the
user to enter any non-numeric value from 9th row & some user given
column number. i.e if user gives 3 as a column number then I don't
want to allow user to enter any non-numeric value from 9th row down &
3rd row right. Same is for pasting the values also. i.e. if someone
pastes some wrong values in this area then I want to trap that.

Now, my intension was that I have to add the code in
spreadsheet_CommandBeforeExecute event to trap the pasting area's
values & check my constraint. But unfortunately I don't get the a
copied values' range in this event. (user may be pasting from other
applications like MS-Word). So I used spreadsheet_CommandExecute event
to trap the values .Here after pasting the values I can get the range
of selection & I can trap the nonnumeric values. But if the
constraints are not matching then I have to undo the command. I am
firing undo command as
spreadsheet_CommandExecute 1000,true ' 1000 is used for undo command.
But I am getting unsuccess to undo the command. So please can
anybody tell me why is it happening? OR where am I wrong?

Thanks in advance.
 

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