Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
MSG Box triggered by move/copy
Is there a macro/VBA code I could use that when a person
goes to move or copy a worksheet, a message box appears with a reminder? Use good ol' "hello world!" as text example for the msg box. Thanks in advance Cameron |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
MSG Box triggered by move/copy
Well, I'm not sure the full solution, but I'd suggest doing something like
this Sub test() Dim myctl As CommandBarControl On Error Resume Next Application.CommandBars(29).Controls(5).OnAction = "testing2" Application.CommandBars(1).Controls(2).Controls(12 ).OnAction = "testing2" End Sub Sub testing2() MsgBox ("Hello World") ThisWorkbook.Worksheets(1).Copy destination End Sub And you would run the test() sub when you open up the book. The only thing you need to figure out are how to get the destination for the copy of the sheet from the user... or perhaps someone out there knows a what to fire a built-in control's native action through code, in which case instead of 'thisworkbook.worksheets(1).copy destination' you could just fire the code for control with ID=848. Hope this at least gets you started - I'd be interested to hear how to do it, if someone can provide the way to fire the builtin control's actions. Mike -- __________________________________________________ __________________________ ________________ Please reply to newsgroup so everyone can benefit. Email address is not valid (see sparkingwire.com) __________________________________________________ __________________________ ________________ "Cameron" wrote in message ... Is there a macro/VBA code I could use that when a person goes to move or copy a worksheet, a message box appears with a reminder? Use good ol' "hello world!" as text example for the msg box. Thanks in advance Cameron |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro for a one time triggered copy of cell value | Excel Discussion (Misc queries) | |||
move or copy sheets doesn't copy format | Excel Worksheet Functions | |||
Can I Move replace instead of Move copy | Excel Discussion (Misc queries) | |||
Automatic copy triggered by change in date | Excel Worksheet Functions | |||
Move/Copy or Copy/Insert worksheet? | Excel Discussion (Misc queries) |