workbook specific macro icons

I have written a graph analysis macro using VB (Excel 2000 Premium) and
assigned a customized toolbar / icon to the macro.  It runs well, but
it's helpful to rename the file after an analysis is complete under a
more desriptive name.

When I do this however, even though the macro is still present in the
newly named file (under Tools-macro-macros...) the icon is looking for
the macro from the original file, and then opens the original file to
run the macro in the newly created file.  So I end up with 2 different
instances of Excel running.  Is there any way that an icon can be
assigned to macro and remain specific for that workbook, regardless of
the workbook's actual filename?

I hope that my description is clear enough!

Cheers,
Mike

0
2/9/2006 1:07:34 AM
excel 39880 articles. 2 followers. Follow

3 Replies
327 Views

Similar Articles

[PageSpeed] 28

Mike,

You need to look at
View, Toolbars, Customise, Attach, and attach the toolbar to the file in 
question.

However, common experience is that this is not 100% reliable when migrating 
workbooks from one machine to another.

When creating more serious systems, most of us will therefore embed the 
toolbar pics in the file in question (usually an add-in) and write custom 
code to create the toolbar based on these pics. There's some code on John 
Walkenbach's site that can get you started on that route if you want to go 
that way.

Robin Hammond
www.enhanceddatasystems.com

<michael_amon@hotmail.com> wrote in message 
news:1139447253.957353.82890@g44g2000cwa.googlegroups.com...
>I have written a graph analysis macro using VB (Excel 2000 Premium) and
> assigned a customized toolbar / icon to the macro.  It runs well, but
> it's helpful to rename the file after an analysis is complete under a
> more desriptive name.
>
> When I do this however, even though the macro is still present in the
> newly named file (under Tools-macro-macros...) the icon is looking for
> the macro from the original file, and then opens the original file to
> run the macro in the newly created file.  So I end up with 2 different
> instances of Excel running.  Is there any way that an icon can be
> assigned to macro and remain specific for that workbook, regardless of
> the workbook's actual filename?
>
> I hope that my description is clear enough!
>
> Cheers,
> Mike
> 


0
rjNOrhSPAM (52)
2/9/2006 1:19:08 AM
Robin,

Thanks, I have done the View, Toolbars, Customize, Attach process and
it does attach the custon icon I made, but when pressing the icon, it
goes back to look for the original .xls file in the location where the
macro was assigned/attached (ie desktop etc).

I don't think I can distribute the as an add-in as I need to give a
fair bit of user interaction and to display several graphs.

I am taking your advice about creating custom toolbars on the fly from
John Wlakenbach's site though...  Unfortunately, I am pretty new at
this, as this is my first program and I'm doing alot of trial and
error!  So I may be a little while, but I'll let you know how it
goes...

Cheers,
Mike

0
2/10/2006 6:44:44 AM
Just a couple of links:

If you want to add an option 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)

"michael_amon@hotmail.com" wrote:
> 
> I have written a graph analysis macro using VB (Excel 2000 Premium) and
> assigned a customized toolbar / icon to the macro.  It runs well, but
> it's helpful to rename the file after an analysis is complete under a
> more desriptive name.
> 
> When I do this however, even though the macro is still present in the
> newly named file (under Tools-macro-macros...) the icon is looking for
> the macro from the original file, and then opens the original file to
> run the macro in the newly created file.  So I end up with 2 different
> instances of Excel running.  Is there any way that an icon can be
> assigned to macro and remain specific for that workbook, regardless of
> the workbook's actual filename?
> 
> I hope that my description is clear enough!
> 
> Cheers,
> Mike

-- 

Dave Peterson
0
petersod (12004)
2/10/2006 12:34:37 PM
Reply:

Similar Artilces:

Where can I find a template for application report specifications.
I have some report specifications to write for programmers to build application reports from, where can I find a Excel template to get me going? ...

Displaying the date a workbook was modified
How doe I insert the date on which the workbook was last saved into a worksheet? -- Bodene ------------------------------------------------------------------------ Bodene's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24924 View this thread: http://www.excelforum.com/showthread.php?threadid=384824 This code should log the save date and time to cell A1 of the active sheet in the book. Range("A1").ActiveWorkbook.BuiltinDocumentProperties(12).Value How and where you use the code depends if you need the refreshing of the data to be automatic or ...

New workbook, same window..
This is a daft one, but I can't find a solution anywhere. Everytime I open a workbook it opens in the same window as the last one. There was a time, in the dim and distant past when each time I opened a workbook, it opened in a new seperate window. Tiling windows annoys me, I want two copies of excel running independently. I just can't figure it out. I know its obvious and stupid, but please help! Cheers, Ben On Fri, 12 Sep 2003 03:52:58 -0700, "Bungers" <bungers@mailinator.com> wrote: >This is a daft one, but I can't find a solution anywhere. > &g...

Linking Workbooks #3
I'm not sure if this is an excel function or an access function. (I don't know Access - however I'm fairly well versed at Excel). My company has a separate Excel spreadsheet with data for each client. We'd like to continually update the data in the client specific spreadsheet and have a separate worksheet that regularly pulls the data from all clients/all worksheets that we may then reference, sort etc. How would we go about establishing this? Thanks. -- Cathy Hi Cathy Maybe the Merge Add-in or code from my site will help you See the "Copy/Paste/Merge example...

How do I set up an "add a line" macro in Excel?
I am trying to record a macro to simply add a line (row) to a spreadsheet. I've had no problem making the macro, however I need to line to be added under the previous line, not above, and I can't figure out how to do that. Any advice would help. Thank you in advance. Tracy, Insert starting at the line below, as in: ActiveCell.Offset(1, 0).EntireRow.Insert HTH, Bernie MS Excel MVP "tracym29" <tracym29@discussions.microsoft.com> wrote in message news:4FA3D7DE-6B3F-4565-804C-C83602227B65@microsoft.com... > I am trying to record a macro to simply add a line (row)...

inserting special character in a cell as a macro
I'm trying to copy 5600 items and I need to use a macro to save some time. I have a column with numbers represented as text. For example 01234 as text. the cell adjacent to it is a city ie. Los Angeles I'm trying to use a macro so the first cell is #01234 - Los Angeles. Can someone help me to figure out this macro. =#01234&" - "&b2 or in b3 =b1&" - "&b2 -- Don Guillett SalesAid Software dguillett1@austin.rr.com "johnnyboy" <u26492@uwe> wrote in message news:66240833078dd@uwe... > I'm trying to copy 5600 items and I need ...

One link breaks every time I open a workbook...
I have 3 workbooks tied together with links. One is a source only, the other two push and pull data. One of the sources, Payroll Master, on opening updates all links fine to the source only workbook but not to the third workbook (which is in the parent directory). Every time I open it it prompts me to show it where the Payroll Entry is. Doesn't matter if I hit cancel and do Edit Links, I can change it there, but will still lose it upon closing (the link appears in the box and looks ok, just won't update...) Try going Edit->Links. Break the link and re-establish it? That m...

Format date with specific regional format
I am working in a international group where users have different regional settings: UK, Denmark, Turkey. I want dates to always show in UK format, even when regional setting is another country. I need this to work in: 1) ordinary cell format 2) using TEXT() function to construct text expressions using dates. In Excel 2003, I remember it was possible to insert a regional code number in brackets into a custom cell format. Is this possible in Excel 2007? Would this work in the TEXT() function? In the format code, try prefixing the UK code [$-809] to the date format. See: http:...

Chart from separate workbooks
Hello! I`m new to this group so greetings for everybody :). My questions (MS Excel 2007): There are 10 separate files, each containing a similar worksheet. There is an eleventh, cumulative file, containing a chart from these ten files. The number of files grows constantly. I would like the charts in the cumulative file to change, based on the newly created files. How to do this in a possibly automatic manner? For example: 5 persons are evaluated each month with a 10-question test and get a grade (from 1 to 5)for each question. In the cumulative file there is a chart depicting the mea...

workbook to workbook
In a cell in workbook no.1 I have this eneterd No.8-CRP-B1, in a cell in workbook no.2 in A7 i want to link this cells so it read the same and will update when updated. so I opened bolth notebooks whe into workbook no.2 and cell A7 entered = and then highlighted the cel in workbook no.1 for some reason I get the response #value why is this when I do this with other cells I have no problem? Thanks for the help -- MIKE0 ----------------------------------------------------------------------- MIKE0W's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2146 View this thr...

default Application icon
Hi I have not set any icon as the application icon. I am creating the desktop shortcut and this shortcut is taking a icon. why so and if I wish to change the icon for the application what should I do? Thanks Look for an Icon in your application with the id of IDR_MAINFRAME, that is the default application icon. When changing this make sure that you look at all the different image types that are in that icon (you can delete the ones you don't want to carry). AliR. <anup.kataria@gmail.com> wrote in message news:1155894255.115864.293670@b28g2000cwb.googlegroups.com... > Hi &g...

paste formulas between workbooks without workbook link
Hello, I want to copy and paste several cells, each containing formulas, from one workbook to another. The formulas contain references to several different sheets and I want the paste to contain the formulas exactly as they are in the originating workbook. When I paste these cells into the destination workbook, however, the formulas have inserted in them links to the originating workbook file name. The only way I can see to solve this problem is to individually select each cell, copy its formula from the edit formula field and then paste it into the edit formula field in the dest...

How do I create a macro to duplicate the current row?
I want to create a macro that will insert a blank row beneath the current row and will then copy the contents of the current row to the inserted row. I can do the operation manually but when I record it as a macro then run the macro it is not quite right. It works fine if I want to add just one new row. However, when I need run the macro to add further rows the macro always returns me to the point (row) where the I ran it for the first time. Does anyone know what I need to put into the macro, when editing it, to stop this happening? Hi As always post your macro for co...

my colors change in my workbook when I open another workbook
I downloaded a template for Excel to my computer. When I use the template, the colors in other workbooks change. After I reboot, it all goes back to normal, until I open the template again. ...

Print and page settings of workbook
I am tired of resetting page attributes on similar worksheets within a workbook. Seems like one should be able to copy print settings (margins, footers, headings, font, etc. etc.) from one worksheet to another with one click like the format brush. What am i missing? Must I write a print macro to do this on each and every multiple set of worksheets? Try selecting the multiple sheets first, then setting the attributes. Just remember to ungroup them before you make changes that *don't* apply to all. In article <OVHh#XvdHHA.984@TK2MSFTNGP04.phx.gbl>, David Greenberg <...

Auto-start macro
Hello, I have a simple macro in Excel named Macro1. How can I make Macro1 run automatically everytime I start Excel? Simple step-by-step replies please. Thanks in advance. Try renaming it to: Auto_Open Frank wrote: > > Hello, I have a simple macro in Excel named Macro1. How can I make Macro1 > run automatically everytime I start Excel? Simple step-by-step replies > please. Thanks in advance. -- Dave Peterson Thanks Dave, worked great! "Dave Peterson" <petersod@verizonXSPAM.net> wrote in message news:4B8E5D84.65E7E0CB@veriz...

how to delete the same columns across a workbook
how to delete the same columns across a workbook Hi, Hold down the CTRL key and click each sheet tab to group them. On the visible sheet delete the column abd it will be deleted on all grouped sheets. Click a sheet tab to un-group sheets. Mike On 5 Jan, 19:39, RPM <R...@discussions.microsoft.com> wrote: > how to delete the same columns across a workbook ...

Macro warning with no macros
I have a workbook that when I try to open it I get the warning tellin me it contains macros and asking whether I want to Enable or Disabl them. I put no macros, no VB scripts, nothing at all in the workboo other than standard Excel formulas and some charts. I developed it i Excel 2002, SP-2, but have moved it back and forth between tw computers, the other which has Excel 97. Regardless of whether Enable or Disable or change the security settings so as not to get th warning, once the workbook is open even if I go t Tools-Macro-Macros... it lists no macros. How can I find out what's cau...

removing reference to other workbook
hi i have a excel wookbook which contains references to other workbook. whenever i open this wookbook it asks me for updating the link to the other workbook. i want to remove these references to other workbook but am not able to figure out which cell is refering to the other workbook. i also have lot of references in the same workbook. i dont want the internal references to be removed. can anyone help me to accomplish this task. any help is highly appretiated. thankx in advance. pradyumna Hi try the following add-in to find/delete links: http://www.bmsltd.ie/DLCount/DLCount.asp?file=FindL...

Swatch Irony Chrono Icon Unisex Watch YCS492
Price:$135.00 Image: http://bestdeallocator.info/image.php?id=B000UVXFVU Best deal: http://bestdeallocator.info/index.php?id=B000UVXFVU Stainless Steel case. Braided Brown Leather bracelet. Silver dial. Fixed bezel. Quartz movement. 39mm case diameter. Water resistant to 30m / 65ft. Swatch Irony Chrono Icon Unisex Watch YCS492. ...

Outlook 2003 folders
Is there a way to change the folder icon in the inbox lists to a different color or even change the icon completly??? No. -- Patricia Cardoza Outlook MVP www.cardozasolutions.com Author, Special Edition Using Microsoft Outlook 2003 Author, Absolute Beginner's Guide to OneNote 2003 ***Please post all replies to the newsgroups*** "jason" <red5_00@yahoo.com> wrote in message news:4f7a01c42c67$61daf650$a101280a@phx.gbl... > Is there a way to change the folder icon in the inbox > lists to a different color or even change the icon > completly??? > ...

Network Icon Missing
I've got an Acer Desktop running Vista Home Premium (SP2) with 2 GB of RAM. All WU's are current. I'm Running CA (California Associates) Security Suite software with no conflict issues. Also have MBAM malware software, CCleaner and SuperAntiSpywareProfessional. I use Windows defender and Windows firewall. As far as I know I have no Malware/Spyware, AV issues. I use Firefox for browsing. I got a blue screen the other day while surfing on my Powere Utility Service sites. Upon reboot my desktop came up minus the little Network icon in the Notification area of the taskbar. Al...

Linked Workbooks
Hi All, I'm using Excel 97 at work and there are two workbooks that someone has linked. I can't figure out how to unlink them. I go under "EDIT", "LINKS" and can view the linked workbook but see no way to delete the link. In Excel 2003 that I have at home I can delete the link. Any ideas? Thanks Brian If you search for .xls, you can find the cells with the links. Then you can copy|paste special|Values. Sometimes they can hide in hard to find spots. You could use Bill Manville's FindLink program to help find them: http://www.bmsltd.ie/MVP/Default.htm NoS...

Problem: High color icons with transparancy not possible in a CTreeCtrl?
I can attach an imagelist with a treectrl and using the itemstate property, let an items state be reprecented with the icons I have drawn. This works very straighforward when creating the imagelist with the "ILC_MASK" style. The transparancy of icons is maintained but ONLY when 16/4byte icons are used. Using e.g. 256 og true color just looks horrible. Of course I thought, dah, ILC_MASK is suppose to only be used when having two icons/images and letting the second one acting as the mask for the first one. Problem is then; a CTreeCtrl accepts ONE state imagelist for all states, so th...

referencing multiple worksheets in macro
So I kind of found the answer to my question in a post from a couple years ago but am still confused so if anyone could help I'd appreciate it...I'm trying to protect the sheet while still being able to use the subtotal function. I have several worksheets I want to do this for and this is the post from before with the code but I can't figure out where to put the names of my worksheets ("01","02","03") and what I need to customize in the code for my file. Any suggestions? Option Explicit Sub auto_open() dim wks as worksheet ...