Microsoft
Software
Hardware
Network
Question : Macro not found error
Hi,
I am getting The macro 'Data Log from 69194.xls!CalculateTotal' cannot be found. error when I am trying to run a macro that resides in another work book.
Here is the code:
Dim target As Workbook
Set target = Workbooks.Open("S:\Data Log from 69194.xls")
Dim res As String
res = Application.Run(target.Nam
e & "!CalculateTotal", "1/11/2009", "2.1.3")
I have defined a a macro as Public Function(arg1, arg2) inside a module in another workbook.
Why am I getting an error when I try to call it?
Answer : Macro not found error
Hi,
Try changing this:
res = Application.Run(target.Nam
e & "!CalculateTotal", "1/11/2009", "2.1.3")
to this
res = Application.Run("'" & target.Name & "'!CalculateTotal", "1/11/2009", "2.1.3")
Regards,
Rob.
Random Solutions
lookout settings keep resetting to default / outlook 2003
SBS 2008 / Exchange Server 2007/Outlook 2007 Sync Error 0X80072F06 - Offline Address Book
Is there a way to print the properties for a given control in Access 2007?
How do I filter a combo box based on another combo box in a subform?
Closing a form with docmd.close
xbox 360 show as mapped or connected external drive to PC
Cached domain credentials in Administrator account of Workgroup computer.
On Insert: The text, ntext, or image data type cannot be selected as DISTINCT
export wordperfect 8 file to file from FoxPro General Field
How to export data from Access database?