Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I'm having difficulty calling a procedure from a separate workbook. Right now I have Application.Run "'S-Report.xls'!Time_Phase" but I'm getting the error message "The macro "'S-Report.xls'! Time_Phase" cannot be found." Any ideas? Thanks, Calvin |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a macro named Time_Phase in that S-Report.xls workbook's project?
Is s-report.xls open? wrote: Hello, I'm having difficulty calling a procedure from a separate workbook. Right now I have Application.Run "'S-Report.xls'!Time_Phase" but I'm getting the error message "The macro "'S-Report.xls'! Time_Phase" cannot be found." Any ideas? Thanks, Calvin -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Aug 12, 8:57 pm, Dave Peterson wrote:
Is there a macro named Time_Phase in that S-Report.xls workbook's project? Is s-report.xls open? wrote: Hello, I'm having difficulty calling a procedure from a separate workbook. Right now I have Application.Run "'S-Report.xls'!Time_Phase" but I'm getting the error message "The macro "'S-Report.xls'! Time_Phase" cannot be found." Any ideas? Thanks, Calvin -- Dave Peterson- Hide quoted text - - Show quoted text - Dave, I got it to work, I had to use "...Time_Phase.Time_Phase". (My guess is because both the module and the procedure had the same name.) I have another question: The Time_Phase macro begins with a vbYesNo message box. Is it possible to automatically select "Yes" when calling the Time_Phase macro externally as I am? Thanks, Calvin |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You need to rewrite the macro to enable the dialog to be skipped. Perhaps
you could add an optional argument which runs the regular way if missing, and runs without the dialog if present. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ wrote in message oups.com... On Aug 12, 8:57 pm, Dave Peterson wrote: Is there a macro named Time_Phase in that S-Report.xls workbook's project? Is s-report.xls open? wrote: Hello, I'm having difficulty calling a procedure from a separate workbook. Right now I have Application.Run "'S-Report.xls'!Time_Phase" but I'm getting the error message "The macro "'S-Report.xls'! Time_Phase" cannot be found." Any ideas? Thanks, Calvin -- Dave Peterson- Hide quoted text - - Show quoted text - Dave, I got it to work, I had to use "...Time_Phase.Time_Phase". (My guess is because both the module and the procedure had the same name.) I have another question: The Time_Phase macro begins with a vbYesNo message box. Is it possible to automatically select "Yes" when calling the Time_Phase macro externally as I am? Thanks, Calvin |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Aug 12, 9:24 pm, "Jon Peltier"
wrote: You need to rewrite the macro to enable the dialog to be skipped. Perhaps you could add an optional argument which runs the regular way if missing, and runs without the dialog if present. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. -http://PeltierTech.com _______ wrote in message oups.com... On Aug 12, 8:57 pm, Dave Peterson wrote: Is there a macro named Time_Phase in that S-Report.xls workbook's project? Is s-report.xls open? wrote: Hello, I'm having difficulty calling a procedure from a separate workbook. Right now I have Application.Run "'S-Report.xls'!Time_Phase" but I'm getting the error message "The macro "'S-Report.xls'! Time_Phase" cannot be found." Any ideas? Thanks, Calvin -- Dave Peterson- Hide quoted text - - Show quoted text - Dave, I got it to work, I had to use "...Time_Phase.Time_Phase". (My guess is because both the module and the procedure had the same name.) I have another question: The Time_Phase macro begins with a vbYesNo message box. Is it possible to automatically select "Yes" when calling the Time_Phase macro externally as I am? Thanks, Calvin- Hide quoted text - - Show quoted text - I cannot alter the Time_Phase macro (the one being called externally). Is there no way to automatically select "Yes" in an externally called message box? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Following worked in a light test, but SendKeys can never be considered
reliable - 'should 'click' default button1 Application.SendKeys "{RETURN}" ' otherwise try ' Application.SendKeys "%y" Application.Run "myBoook.xls!myMacro" ' in myBoook.xls Sub myMacro() Dim answer As VbMsgBoxResult answer = MsgBox("Respond", vbYesNoCancel) ' also try following ' answer = MsgBox("Respond", vbYesNoCancel or vbDefaultButton3) Select Case answer Case vbYes MsgBox "yes" Case vbCancel MsgBox "cancel" Case vbNo MsgBox "no" End Select End Sub Regards, Peter T wrote in message oups.com... On Aug 12, 9:24 pm, "Jon Peltier" wrote: You need to rewrite the macro to enable the dialog to be skipped. Perhaps you could add an optional argument which runs the regular way if missing, and runs without the dialog if present. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. -http://PeltierTech.com _______ wrote in message oups.com... On Aug 12, 8:57 pm, Dave Peterson wrote: Is there a macro named Time_Phase in that S-Report.xls workbook's project? Is s-report.xls open? wrote: Hello, I'm having difficulty calling a procedure from a separate workbook. Right now I have Application.Run "'S-Report.xls'!Time_Phase" but I'm getting the error message "The macro "'S-Report.xls'! Time_Phase" cannot be found." Any ideas? Thanks, Calvin -- Dave Peterson- Hide quoted text - - Show quoted text - Dave, I got it to work, I had to use "...Time_Phase.Time_Phase". (My guess is because both the module and the procedure had the same name.) I have another question: The Time_Phase macro begins with a vbYesNo message box. Is it possible to automatically select "Yes" when calling the Time_Phase macro externally as I am? Thanks, Calvin- Hide quoted text - - Show quoted text - I cannot alter the Time_Phase macro (the one being called externally). Is there no way to automatically select "Yes" in an externally called message box? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help with Application.FileSearch method | Excel Programming | |||
Excel.Application.Quit() method | Excel Programming | |||
GetObject method from excel to other application from remote server | Excel Programming | |||
Application.Run Method | Excel Programming | |||
Making VB PasteSpecial method to work the same as Excels Application | Excel Programming |