Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro for a one time triggered copy of cell value Azrael[_2_] Excel Discussion (Misc queries) 8 March 4th 09 04:24 PM
move or copy sheets doesn't copy format ColinX Excel Worksheet Functions 1 May 14th 08 10:07 PM
Can I Move replace instead of Move copy [email protected] Excel Discussion (Misc queries) 2 January 9th 08 10:25 PM
Automatic copy triggered by change in date Xerxes Excel Worksheet Functions 1 November 23rd 07 11:04 AM
Move/Copy or Copy/Insert worksheet? kjk Excel Discussion (Misc queries) 0 December 15th 06 02:40 PM


All times are GMT +1. The time now is 01:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"