|
|
Macro not running
I have recorded a macro in an Excel 2002 template, created a Custom Menu
Item, and assigned the macro name to it.
When I open the template (which creates the file “name1.xls”) and run the
macro from the Custom Menu Item, it fails with the message “name1.xls could
not be found”.
However, when I run from ‘Tools | Macro | Run’ it works OK.
I'm confused. Any help would be appreciated.
|
|
0
|
|
|
|
Reply
|
Utf
|
5/7/2010 8:17:01 AM |
|
First, if you really created a template workbook, then the workbook's that
created isn't name1.xls -- it won't have an extension until you save it to
disk. It should be just name1 or name11 or name12 or ...)
But I wouldn't put the macro in a template workbook. When you start the new
workbook based on this template, the customized menu macro will still point to
the .xls file (where you did your testing).
You could either have code that fixes the problem, but even easier would be to
uses an addin that creates the menu item and destroys it when you close excel.
Saved from a previous post:
For additions to the worksheet menu bar, I really like the way John Walkenbach
does it in his menumaker workbook:
http://j-walk.com/ss/excel/tips/tip53.htm
Here's how I do it when I want a toolbar:
http://www.contextures.com/xlToolbar02.html
(from Debra Dalgleish's site)
In xl2007, those toolbars and menu modifications will show up under the addins.
And if you use xl2007:
If you want to learn about modifying the ribbon, you can start at Ron de Bruin's
site:
http://www.rondebruin.nl/ribbon.htm
http://www.rondebruin.nl/qat.htm -- For macros for all workbooks (saved as an
addin)
or
http://www.rondebruin.nl/2007addin.htm
And Bob Phillips shows a way to use a wrapper so that it can work in both xl2003
and xl2007.
http://msmvps.com/blogs/xldynamic/archive/2010/03/27/deploy-me-simple.aspx
Grey Old Man wrote:
>
> I have recorded a macro in an Excel 2002 template, created a Custom Menu
> Item, and assigned the macro name to it.
>
> When I open the template (which creates the file “name1.xls”) and run the
> macro from the Custom Menu Item, it fails with the message “name1.xls could
> not be found”.
>
> However, when I run from ‘Tools | Macro | Run’ it works OK.
>
> I'm confused. Any help would be appreciated.
--
Dave Peterson
|
|
0
|
|
|
|
Reply
|
Dave
|
5/7/2010 1:19:02 PM
|
|
|
1 Replies
257 Views
(page loaded in 0.222 seconds)
Similiar Articles: vbscript start excel run macro not working - microsoft.public ...I am trying to run a vbscript that opens excel then executes a macro. I have code that works but I get an error saying "The macro "sort" can not b... Copy-Paste not working after running the macro - microsoft.public ...Hi, I am unable to do copy paste the data in the cells after i run the macro(to change the cell color according to the value) I am unable to p... Interrupt running macro? - microsoft.public.powerpointIn the VB Editor, when I'm testing a macro, I can press the BREAK key to interrupt and stop the macro. Is there a way to interrupt a macro while it's running from an ... automation Excel running macro in XLA - microsoft.public.vc.mfc ...I have linked up the Automation code and can run an Excel macro from MFC - works really well What I'd like to do is put all my VBA code into an... Using Scheduled Tasks to run Macros problem - microsoft.public ...I have a database with two macros in it. When i run these macros from within the database, they run fine and when I run the shortcuts to the macros ... Autonew macro won't run in Word 2007 - microsoft.public.word ...However, for many users, myself included, the AutoNew macro does not run when you open a new document based on a .docm template, while it does so when creating a new ... parameter not action to run a named macro - microsoft.public ...Hello I'm trying to trap an event or command to then run a named macro "i'm finding it a little like trying to chop wood on my face" here is ... Create a macro in Outlook to run a rule - microsoft.public.outlook ...I created a rule in Outlook 2007 for e-mails that have certain words in the subject line, to be deleted. I have checked the rule and made it first but it does not run. Word 2007 Macros not working - microsoft.public.word.vba.general ...macros shortcut keys don't work - microsoft.public.excel ... I have several macros they will run from tools, macro, run but not ... Macro shortcut keys in Word 2007 ... Open an excel spreadsheet and run a macro from Access VB ...vbscript start excel run macro not working - microsoft.public ... Open an excel spreadsheet and run a macro from Access VB ... vbscript start excel run macro not working ... Run a macro - Excel - Office.com - Microsoft Corporation: Software ...In Excel 2007, after you record a macro, you need to run it to make it work. The Run button is in the Macro dialog box (Developer tab, Code group). Macros and add-ins do not run when security is set to High in ...Describes a problem that occurs when you try to run a macro. To resolve the problem, add digital signatures to your macro, or obtain an add-in with a ... Running Macros - Microsoft Corporation: Software, Smartphones ...After you record or manually create a macro, you can run it the following ways: By a keyboard shortcut in the integrated development environment (IDE). Macro Recording and Running Issues - Microsoft Corporation ...The following is a list of issues you can encounter when recording and running macros in Visual Studio. Excel - Workbook_open Macro Not Running - Has anybody... - Free ...Workbook_open Macro Not Running - Has anybody experienced Workbook_Open macros sometimes... - Free Excel Help 7/23/2012 3:08:13 AM
|
|
|
|
|
|
|
|
|