Undo c++ macro not found??
Hi im righting some stuff in Excel with a UDF button made under ATL/COM.
i want the user to be able to make an undo. righting is fine. with using
OnUndo i m able to get a the undo clicked under excel but then i get makto
"undoright" not found
any idea ?
mny thnks
here s a simple example
Header::
Excel::_ApplicationPtr xapp;
Excel::RangePtr xSaved;
void right()
{
//saving for undo
xSaved=xapp-GetRange("a3:a10")
//righting to sheet
xapp-GetRange("a3:a10")-Value2="justatest";
}
Undoright
{
xSaved-Activate();
}
//called when button is clicked
void __stdcall MyExcelTools::ApplyClick(Office::_CommandBarButton Ptr Ctrl,
VARIANT_BOOL * CancelDefault)
{
right();
m_x1-OnUndo("Undoright","right");
}
|