Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
MAK MAK is offline
external usenet poster
 
Posts: 20
Default macro adding

I have developed an Excel file with macro, which is passed to user. I want
to add coding in it by asking user to run another macro (my newly developed
macro). How can I do it?
Thank you very much in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default macro adding

Mark,

View the code and add a user prompt to the worksheet object on activate....

select case msgbox "Would you like to run my macro", vbyesno,"Macro Run
Confirmation"
Case vbYes
run your macro
Case vbNo
exit sub
end select
--

Tech Whiz Tom
MS Access / Excel Applications Analyst


"Mak" wrote:

I have developed an Excel file with macro, which is passed to user. I want
to add coding in it by asking user to run another macro (my newly developed
macro). How can I do it?
Thank you very much in advance.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default macro adding

Sub ExistingMacro()
If MsgBox("Run my new macro?", vbYesNo) = vbYes Then NewMacroName
End Sub

Sub NewMacroName()
MsgBox "Hello from NewMacroName"
End Sub

HTH,
Bernie
MS Excel MVP


"Mak" wrote in message
...
I have developed an Excel file with macro, which is passed to user. I want
to add coding in it by asking user to run another macro (my newly developed
macro). How can I do it?
Thank you very much in advance.



  #4   Report Post  
Posted to microsoft.public.excel.programming
MAK MAK is offline
external usenet poster
 
Posts: 20
Default macro adding

Thanks for your reply but not my wish. Maybe I mislead you.

I want to insert some codings from one Sub (in my newly developed Excel
file) to another Sub (in another Excel file). Any ideas?

"Bernie Deitrick" wrote:

Sub ExistingMacro()
If MsgBox("Run my new macro?", vbYesNo) = vbYes Then NewMacroName
End Sub

Sub NewMacroName()
MsgBox "Hello from NewMacroName"
End Sub

HTH,
Bernie
MS Excel MVP


"Mak" wrote in message
...
I have developed an Excel file with macro, which is passed to user. I want
to add coding in it by asking user to run another macro (my newly developed
macro). How can I do it?
Thank you very much in advance.




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default macro adding

See Chip Pearson's site.

http://www.cpearson.com/excel/vbe.aspx


Gord Dibben MS Excel MVP

On Tue, 17 Mar 2009 09:36:01 -0700, Mak
wrote:

Thanks for your reply but not my wish. Maybe I mislead you.

I want to insert some codings from one Sub (in my newly developed Excel
file) to another Sub (in another Excel file). Any ideas?

"Bernie Deitrick" wrote:

Sub ExistingMacro()
If MsgBox("Run my new macro?", vbYesNo) = vbYes Then NewMacroName
End Sub

Sub NewMacroName()
MsgBox "Hello from NewMacroName"
End Sub

HTH,
Bernie
MS Excel MVP


"Mak" wrote in message
...
I have developed an Excel file with macro, which is passed to user. I want
to add coding in it by asking user to run another macro (my newly developed
macro). How can I do it?
Thank you very much in advance.







  #6   Report Post  
Posted to microsoft.public.excel.programming
MAK MAK is offline
external usenet poster
 
Posts: 20
Default macro adding

Thank you. It works.

"Gord Dibben" wrote:

See Chip Pearson's site.

http://www.cpearson.com/excel/vbe.aspx


Gord Dibben MS Excel MVP

On Tue, 17 Mar 2009 09:36:01 -0700, Mak
wrote:

Thanks for your reply but not my wish. Maybe I mislead you.

I want to insert some codings from one Sub (in my newly developed Excel
file) to another Sub (in another Excel file). Any ideas?

"Bernie Deitrick" wrote:

Sub ExistingMacro()
If MsgBox("Run my new macro?", vbYesNo) = vbYes Then NewMacroName
End Sub

Sub NewMacroName()
MsgBox "Hello from NewMacroName"
End Sub

HTH,
Bernie
MS Excel MVP


"Mak" wrote in message
...
I have developed an Excel file with macro, which is passed to user. I want
to add coding in it by asking user to run another macro (my newly developed
macro). How can I do it?
Thank you very much in advance.






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
Adding a new row with a macro Dobbs734 Excel Discussion (Misc queries) 2 June 1st 09 06:08 PM
Adding to a Macro Steven Excel Discussion (Misc queries) 2 December 15th 08 06:21 PM
Adding a Tab in a Macro [email protected] Excel Discussion (Misc queries) 10 February 28th 06 09:57 PM
adding macro Lynn[_6_] Excel Programming 6 October 3rd 05 08:39 AM
Adding Row to this macro Nigel Excel Discussion (Misc queries) 2 May 4th 05 05:27 PM


All times are GMT +1. The time now is 12:26 PM.

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

About Us

"It's about Microsoft Excel"