Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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"); } |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
use macro and allow undo | New Users to Excel | |||
Undo a Macro | Excel Discussion (Misc queries) | |||
Undo a Macro? | Excel Programming | |||
Undo row insert from macro | Excel Programming | |||
Undo Macro | Excel Programming |