Link an addin macro to a custom button

Hi All,

I created an addin.  Now I created a custom button and want to link a marco 
from the addin to it.  I cannot figure out the proper syntax can someone 
help?

Thanks
Chad

Addin is: MyAddin.xla
Module is: Monitoring
Sub is: UpdateRelMovGraph 


0
chadNOT483 (12)
6/25/2009 9:18:02 PM
excel 39879 articles. 2 followers. Follow

2 Replies
688 Views

Similar Articles

[PageSpeed] 58

If this is a button on a toolbar...

Saved from a previous post:

Your life will become much simpler if you include code to create the toolbar
when the workbook is opened and include code to destroy the toolbar when the
workbook is closed.

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

Chad Cameron wrote:
> 
> Hi All,
> 
> I created an addin.  Now I created a custom button and want to link a marco
> from the addin to it.  I cannot figure out the proper syntax can someone
> help?
> 
> Thanks
> Chad
> 
> Addin is: MyAddin.xla
> Module is: Monitoring
> Sub is: UpdateRelMovGraph

-- 

Dave Peterson
0
petersod (12004)
6/25/2009 9:42:36 PM
I guess I was looking way to deep.

Just enter the Sub name.  Excel will find it.

Thanks anyways,
You guys/gals always rock
Chad

"Chad Cameron" <chadNOT483@hotmail.com remove NOT> wrote in message 
news:%23thsspd9JHA.1252@TK2MSFTNGP04.phx.gbl...
> Hi All,
>
> I created an addin.  Now I created a custom button and want to link a 
> marco from the addin to it.  I cannot figure out the proper syntax can 
> someone help?
>
> Thanks
> Chad
>
> Addin is: MyAddin.xla
> Module is: Monitoring
> Sub is: UpdateRelMovGraph
> 


0
chadNOT483 (12)
6/25/2009 9:43:37 PM
Reply:

Similar Artilces:

missing button on toolbar
In excel 2003, I like to have the two icons on my toolbars showing the option to email as attached file, and the second button to email as text. When I customize my toolbar and add these icons, after closing the customize menu, the icon for emailing as text dissappears, it re-appears when I open customize menu. I tried copying to another toolbar, and get the same result. Does anyone know how to keep this from dissappearing Thanks in advanc Ron Funny, I don't see a Mail as Text toolbutton via Customize in Excel 2003. All I see in the File menu group (or any group) is Mail as Attachment....

Change link between form and subform
I have a form with a subform in it. I would like to change the way they are linked so instead of linking from Old ID, they link to New ID I don't know anything about code, is there a way to just change the cell it relies on? Thanks C Confused87 - Bring up the properties of the subform, and change the values in 'Link Child Fields' and 'Link Master Fields' on the Data tab of the properties dialog box. Make sure you have the subform selected, not the form within the subform. -- Daryl S "Confused87" wrote: > I have a form with...

Difficult in creating a macro
I am having difficulty in creating a section of a macro. I need to be able to copy and paste a range of cells from one area to another. The copied area of cells needs to be such that when I push CTRL-ArrowUp from below it, that it goes to the first actual number instead of the first copied cell. I have tried <Copy> and then <Paste Special> and checked only the values box, but this still results in the cursor moving only to the bottom-most copied cell instead of the bottom-most cell with an actual number in it. I need to do this so that I can make charts that accurately reflect...

linking #4
I am trying to link and .slk file to a .xls file all the links appear to be updating but i keep getting a message that excel cannot update 1 or all of the links. Is this common when linking with an .slk because i have several linked wrk books and have never had this problem. thanks Dean ...

Linked Forms
Hello, I am doing a project that requires two forms.. The first form contains the data for a business the second form contains data for the business owner... How do I link the two forms together...? Many thanks. Bob Send a common key piece of data from the first form (say the company name) to the second form page and include it in the second form as a hidden form field (then if using a database to store the results link with a relationship the 2 results tables by the common field) For form passing information see http://irt.org/articles/js063/index.htm -- ____...

17 ways to Optimize VBA Code for FASTER Macros
Here is a summary of the article: 1. Analyze the Logic 2. Turn off ScreenUpdating 3. Turn off 'Automatic Calculations' 4. Disable Events 5. Hide Page breaks 6. Use 'WITH' statement 7. Use vbNullString instead of "" 8. Release memory of Object variables 9. Reduce the number of lines using colon(:) 10. Prefer constants 11. Avoid Unnecessary Copy and Paste 12. Clear the Clipboard after Paste 13. Avoid 'Macro Recorder'...

Links not linking
Hello I have written a fairly big spreadsheet linking through the pages with SUM, SUMIF and SUMPRODUCT formula's What I am now finding is that when I update one page it doesn't update the rest, even if I am only typing in a figure to the SUM function. I have check and the calculations function is on automatic. is there a fix or something that I could run to make sure that all the formulas are working correctly. thanks Just a guess (since you already checked tools|options|calculation tab). How about selecting all the cells (ctrl-a (twice in xl2003)) and then edit|replace what: ...

Open a form in a subform depending on button.
Hi Sorry this is probably really simple but for the lfie of my can't find how to do it. I have a form with three buttons and an Unbound subform. I would like that when I click one of the buttons it opens another form in the currently unbound subform. I can work out how to open a form in another window but I want it to open in the subform. Also If I wanted it to open a query instead of another form in this subform would this change much? Thanks James On Fri, 20 Nov 2009 03:37:02 -0800, james <james@discussions.microsoft.com> wrote: Me.mySubformControl...

How to show Customer Name on MY Credit Card Receipt?
Hi, I was wondering if anyone knows how to print Customer Name on the Store's copy of the Credit Card transaction receipt. Basically 2 receipts are printed - one for customer and one that customer signs and gives back to us. The one that customer keeps always has the customer's name on it. However, our own copy has an unclear signature but not the customer's name and this makes it difficult to audit and match customers to their receipts at the end of the day (we do this to keep track of things which is helpful to us). How can we amend the receipt to print customer name on...

Linked Table Manager in ACCESS
Hi, I am trying to change a field in an ACCESS table and get an error message that says the table is a linked table and fields can't be changed. After googling for some answers, I think I should be able to find out the link using "Linked Table Manager" in ACCESS. However, the "Linked Table Manager" button is grayed out. Any ideas/suggestions are welcome. Thanks. Richard Open the table in Design View. Reduce the window so that you can see the window's top bar. Right click in the top bar of the window (usually blue in color) and select ...

Link To A Cell From Chart
Hi all. I have a text box in a chart worksheet. Can I link it to an information from any cell in other worksheet in the same workbook. Thanks. Yes. Click the text box icon, then click on the chart sheet to insert the text box. Click in the formula bar and =Sheet1!A2 (or whatever cell you want to link). -- Greeting from the Gulf Coast! http://myweb.cableone.net/twodays "Salza" <salza@tm.net.my> wrote in message news:3fbfb0bf_2@news.tm.net.my... > Hi all. > I have a text box in a chart worksheet. Can I link it to an information from > any cell in other worksheet in...

links
Dear All, It is very critical for my business to learn the basics and the backbone of links in Excel. Are there any tutorials or articles that gives wealth of information about MS Excel links? (in Excel 9.0.6) Web addresses are also welcome. You can also post to my e-mail above. Thank you in advance. Mustafa .. I would advise you go to the newsgroup "microsoft.public.excel.links", and read everything you can about their troubles there and the solutions......... Vaya con Dios, Chuck, CABGx3 "Mustafa" <anonymous@discussions.microsoft.com> wrote in messag...

passing custom field from lead to account on conversion
We are using CRM 3.0. We have a custom text field in our lead form/entity which we would like copied to a similar custom field in the account form/entity when a Lead is converted into an Account, Contact, Opportunity. Would someone be able to explain how to do this? Many thanks You need to add a mapping on the relationship between Lead and the other objects. This is done through the customization. Open the lead, then got o the relationships tab, find the one tied to the right objet and edit it. The mappings are on the relationship. -- Matt Parks MVP - Microsoft CRM "DMcL&q...

Linked Tables Over A LAN
Hi, I have a problem with a PC that is sharing an Access database over a LAN. I'm hoping someone may be able to give me a little advice. By the way, I'm a bit of an amatuer so go easy on the technical terminology ;-). I've got four PCs networked through a router which provides internet access. Two PCs are running XP Pro and two are running Vista Business 32bit. One Vista machine holds my full database while the other PCs have a similar database but with tables linked to the first machine. Been running this setup for several years, on various older PCs, with no problems. My proble...

Links
Every time I open a spesific workbook, I get the question if I want t use the old or the new data. This is very irritating! How do I disabl the link that is the reason for this message??? Please help me befor this drives me CRAZY!! ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com Siri You will have a formula somewhere within the wordbook that is linked to another workbook. You can look for them manually and the copy>paste special>values... to kill it. or you could d...

Macro #12
Why would a macro behave differently attached to a command button than when event driven through calculate worksheet? What does "behave differently" mean to you? It might help for you to post both a description of what you're concerned about, and relevant parts of your code in a reply message. A couple of things different: Macros in a regular code module may have different default behavior than macros stored in a worksheet code module - for instance Range("A1") in a regular code module is equivalent to ActiveSheet.Range("A1"). In a worksheet module, t...

Custom Formatting for Dates
Is there a manner of formatting to see date as Text?, if entered in same cell. Think that is what I need. Using custom formatting: yymmdd and making column narrow, so just see dd (with right justify). Problem is that going from text to date format, just see ## is there way to make yymmdd in custom to conform to text??? Thanks a1 11/2/05 b1 =TEXT(A1,"yymmdd") you will get b1 051102 ==================== "nastech" <nastech@discussions.microsoft.com> wrote in message news:89817178-868E-4E3C-9946-6A1E93B0080F@microsoft.com... > Is there a man...

email links in Publisher pdf
Why won't Publisher 2007 convert my email links correctly when saved in pdf format? It puts "mail to:" in twice automatically. It is converting website links without a problem. If memory serves the Office 2007 SP1 fixed this in Publisher. The SP2 is also now available. There have been some reports of not being able to open existing Publisher files after installing it, and a report that a fix for that bug is due by the end of the month....you might want to wait to install SP2 until after the first of the month, or just install SP1. DavidF "Rora" <Rora@discu...

Chart template and links
Hi, I have something "strange " (at least for me) going on ... I have an xls workbook, containing some data sheets and also 3 chart templates. These chart templates are copied via a macro to the output xls with the statement : Sheets(ChartName) _ .Copy Before:=Workbooks(targetfile.Window).Sheets(1) When I now look to this chart template in the output xls I got a link to the original xls workbook in which the macro is running. (I can see that via EDIT>LINKS...) Now I do NOT want that link to the originator xls workbook at all ! Is there anybody who knows how I can co...

Linking to ODBC Linked Tables
Hi: I wonder if you have any suggestions for this. We have moved our Access tables into Oracle and have created a MS Access Database that links to these ODBC tables. Each of our users has a local copy of our Reporting Database that formerly linked to Access tables, but now we want them to link to the Ms Access Database which contains the linked ODBC tables on our shared drive. In trying to link to already linked ODBC tables, Access gives an error and will not link to these tables. Is there a way to let our users link to the Access database that contains the linked ODBC tables? Any...

Is there a simple procedure to set my macros in Excel 2003 to be .
I have tried to create a digital signature as instructed in Help. I created it, but it is not in a trusted zone or something like that. How can I set Excel 2003 so that I am free to create and use macros? Shelley I assume you created the certificate/signature using the SelfCert tool in Office. Also, your Macro Security is set to "medium". With your workbook containing macros open, hit ALT + F11 to get to Visual Basic Editor. Select your workbook/project and Tools>Digital Signature>Choose. Pick the certificate you created and OK your way out. Save the workbook and clo...

Linked Graphs from Excel
I have linked graphs from excel into my publisher document using Paste Special. The problem is that when they paste in they reshape (I have pie charts and they come in publisher looking like tall skinny ovals). I can fix the shape of the charts manually after pasting them in, but when I update the links the reshaping reverts to its original, incorrect size. Any suggestions on how I can use the linking to excel and not have to resize every time I update? "Paste Special" as what format? Have you tried an image format? -- Mary Sauer MSFT MVP http://office.microsoft.com/ http...

2007 does not like 2003 chart macros
I have a lot of time invested over the years in macros to analyze data from my work. I read and graph various files of data that I assemble into an Excel sheet. Everything works perfectly in 2003. But in 2007, I can not reliably generate graphs that include all my data. I have observed at least 2 repeatable problems as follows: 1. I can generate a "base" graph with up to 4 data series. If I then run a macro to change each series line color and weight, I will loose the 4th series. The data is there and the series shows up on on the graph key, but there is no visible line...

problem with accessing toolbar button
I want to have a toolbar button pressed state pwhen I choose a menu item, so I add to the handler function of the menu item in mainframe: CToolBarCtrl tbCtrl = m_wndToolBar.GetToolBarCtrl(); tbCtrl.PressButton(ID_MYBUTTON, 1); I get the following error at compile time: Error 1 error C2248: 'CObject::CObject' : cannot access private member declared in class 'CObject' c:\program files\microsoft visual studio 8\vc\atlmfc\include\afxwin.h 1814 Obviously, I can't access the toolbar button with this approach, so how should I write it to get the button pressed? >I want to...

linking subforms
my application have customers and invoices. each customer can have 1 or more invoices. on my form i have a subform for customers and one subform for invoices. both subforms are in datasheet view. if i click on customer A in the customer subform i want the invoice subform to show only invoices for customer A and at the same time allow me to add invoices for customer A. what are the steps to accomplish this? also i want to be able to print a report such that customer A is listed together with all customer A's invoices followed by customer B and so on. how can this be accomplished? thanks ...