keyboard shortcut in addin macro

How do you assign a keyboard shortcut or a custom button to run a macro which 
is in an addin.

These macros dont appear on the macro list

Thanks
-- 
Patrick
0
Patrick2861 (490)
11/23/2004 2:15:08 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
271 Views

Similar Articles

[PageSpeed] 37

Hi
have a look at the OnKey method in the VBA help

--
Regards
Frank Kabel
Frankfurt, Germany

"Patrick" <Patrick@discussions.microsoft.com> schrieb im Newsbeitrag
news:FBEB937C-C3FC-47BB-8E8A-EE0BBCB14DFB@microsoft.com...
> How do you assign a keyboard shortcut or a custom button to run a
macro which
> is in an addin.
>
> These macros dont appear on the macro list
>
> Thanks
> --
> Patrick

0
frank.kabel (11126)
11/23/2004 4:25:54 PM
Patrick

To assign an Add-in macro to a button from the Forms toolbar or from a button
from the Commands>Macros section, simply right-click on the button and "Assign
Macro".

NOTE: just about any object can have a macro assigned to it.  Shape, Wordart,
Picture to name a few.

Type the macro name into the dialog box.  No need to preface with the Add-in
name.

Is the Add-in one that you have created?

You can go into the VBE Project Explorer and select the Add-in and expand the
Excel Objects.

Select ThisWorkbook Object.

Then View>Properties.

Change IsAddin to false.

Alt + Q to return to Excel window.

Your macros will be available in Tools>Macro>Macros.

Select a macro.

Hit Options button to set a shortcut key for that macro.

When happy with what you've done, go back to VBE and reset the IsAddin to
True.

Gord Dibben Excel MVP

On Tue, 23 Nov 2004 06:15:08 -0800, "Patrick"
<Patrick@discussions.microsoft.com> wrote:

>How do you assign a keyboard shortcut or a custom button to run a macro which 
>is in an addin.
>
>These macros dont appear on the macro list
>
>Thanks

0
Gord
11/23/2004 10:26:29 PM
Reply:

Similar Artilces:

delete personal macro
Hi, I've created a macro in my personal wkbk,however, I dont know how to delete the macro completely. I tried to delete from tool --> macro.... , a pop up says I hav to unhide a wkbk to perform. For this, I dont really understand which workbk its asking actually? The orginal one when I was creating the marco? thx The workbook to unhide is Personal.xls. You do that from the Window menu. /On Mon, 21 Mar 2005 18:15:04 -0800, "kalz" <kalz@discussions.microsoft.com> wrote: >Hi, >I've created a macro in my personal wkbk,however, I dont know how to delete &g...

Macro #49
Hi guys: I got a question about marco.see below. Adding a new customer to the list whose amount owed should initially be $1500 (the macro should ask you for this value) The macros are to be activated by clicking onto buttons appearing on the debtor2. Thanks. -- SLINKYBOY ------------------------------------------------------------------------ SLINKYBOY's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=27957 View this thread: http://www.excelforum.com/showthread.php?threadid=474580 ...

Macro or VB code to hide and unhide Label box
I need your help to create a macro or a Visual Basic code that do the following: I have a cell with a macro that shows “Meets” or “Does not Meets” depending of the result of other cell. That I’m trying to do is a macro or visual basic code that display a Label box when “Meets” is showed and hidden it when “Does not Meet” is showed. I'm trying a VB code using the if statement to change the visible property (to False and True) of the Label box but is not working. I'm not very familiarized with visual basic and I’m not at the level of skills of many of you so please take...

Shortcut KEY for sendto item
How can I define a shortcut key for a custom sendto menu item? I have a folder c:\temp. When browsing my pictures in thumbnails view, I want to push F12 when a picture is highlighted to copy the picture to c:\temp. I have a shortcut to c:\temp in my sendto folder, if I assign F12 to it - doesn't work. If I create a shortcut to C:\Documents and Settings\Alec\SendTo\Shortcut to c:\temp and assign F12 to that it opens the target instead of copying the highlighted file to it. Suggestions Thanks ...

MACRO BUTTONS
Hello, If you have seveal buttons to activate different macros, can you put all of the buttons into a drop-down? As always, any help greatly appreciated. Hi, Well maybe, sort of. First, where is the drop down - is it in the spreadsheet, on a toolbar, on a menu, or on a user form? What version of Excel are you using? -- If this helps, please click the Yes button. Cheers, Shane Devenshire "JOHN" wrote: > Hello, > If you have seveal buttons to activate different macros, can you put > all of the buttons into a drop-down? > As always, any...

Macro code to clipboard
I have a macro that Pastes/Special/Values with one click. But it is not recognized by the undo feature. Is there a way that I can do this code that the Undo feature can still be used. Thank you, Steven Steven, You would need to write your own undo code. Have a look here http://www.j-walk.com/ss/excel/tips/tip23.htm -- Mike When competing hypotheses are otherwise equal, adopt the hypothesis that introduces the fewest assumptions while still sufficiently answering the question. "Steven" wrote: > I have a macro that Pastes/Special/Values with o...

Sending shortcuts or hyperlinks to Windows XP users
I am on a shared network. When I send a shortcut or hyperlink to individuals on the network with Windows XP, it prompts them to save the file to disk with no option to open. Because this is a shortcut, I would like them to be able to click the shortcut and open the file. Does anyone know a way to do this for XP users? ...

Can't Assign Macro (not grayed out but nothing happens)
This is not the case where the "Assign Macro" option is missing. My Solution: Be sure at least one worksheet is open. Symptoms: Right Click on Toolbar Click Customize Right click on Command Button or Menu Item, etc. The "Assign Macro" option is there but nothing happens: Hopefully this will help someone. -- My handle should tell you enough about me. I am not an MVP, expert, guru, etc. but I do like to help. ...

Deleting files in a macro
I have created a spreadsheet which collects and summarises data from other temporary spreadsheets, which are output from an Access application. My macro then copies and pastes the collected data as values. I would then like to delete the temporary files. I think I oughtto be able to do this from within the macro. Can anyone help? Stuart PS Is it possible to save the collection spreadsheet with a date based name, created by the macro itself. For example "yymmdd.xls" Hi have a look at the Kill method in the VBA help -- Regards Frank Kabel Frankfurt, Germany "Stuart&qu...

Excel 97 worksheet with macros won't open in Excel 2000
I've got a workbook saved in Excel 97 that has some embedded macros (not sure where-we don't really need them). When trying to open from Excel 2000, get error message "An error occurred while initializing the VBA libraries (126)" and the workbook won't open. Any ideas on how to make this work in 2000? Or maybe even find where the macros are and get rid of them? Thanks, Marion ...

Macro as Scheduled Task
I have created a shortcut that launches GP and automatically runs a macro (per TK# 855677). I am now trying to schedule this to run on a Server 2003 machine using Scheduled Tasks. I've tried entering the entire command line (see below) - with and without the qutoes; I've tried entring just the macro (by associating .MAC with Dynamics.exe), and I have tried putting the entire command line into a .BAT file, and running that in Scheduled Tasks. The 'Last Run Time' of the task changes, and sometimes the status shows 'Running' but nothing else appears to be happeni...

UNABLE TO RECORD EXCEL MACRO
Hello, I was able to record excel macros up until last week. There was a pop-up informing me of a MISSING Visual Basic Library. Thereafter, when I try to record excel macro, I receive a pop-up message "Unable to Record". I have tried DETECT and REPAIR and even uninstalled and reinstalled my MS Office XP. However the problem still persisted. Please advise. THX. You will need to go into the Visual Basic Editor, selec "Tools"/"References" from the toolbar and check the appropriat libraries are selected. You should have as a minimum: Visual Basic For Appl...

Formula trigger a macro??
Is it possible for a formula to trigger a macro?? I want to do something like: =IF(X=10,[run the macro],"") Thanks for your help! Jeff Hi Jeff AFAIK this is not possible. One workaround would be to use the woksheet_change event and insert your code there. e.g. Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Intersect(Target, Me.Range("X1")) Is Nothing Then Exit Sub If Target.Cells.Count > 1 Then Exit Sub On Error GoTo CleanUp With Target If .Value = 10 Then ' Application.EnableEvents = False 'inse...

Shortcut
Hello: I'm programming an application and the user has asked that they be able to specify short cut keys for certain toolbar buttons. I didn't know if such a mechanism existed so I began creating a dialog box that accepts a menu ID and provides the user with capabilities much in the same way as Visual Studio for specifying shortcut keys for menu items. I'm nearly finished now, so it probably doesn't matter, but does such a thing already exist? Am I re-inventing the wheel? Thank you, Dan If you added the menu just so you can get the shortcut keys, you could have si...

Repeating instructions in a Macro.
Hello all, I have a Macro that clears any data on different 31 tabs and, due to my lack of knowledge, I do this one tab at a time. The 31 tabs represent the maximum possible days in a month. Here's a sample of my Macro: '====================================================================================================================== ' Clear the data on tab 1. Windows("Revenue Tracker.xls").Activate Sheets("1").Select Range("B4:O126").Select Selection.ClearContents Range("E4").Select '-----------------...

Macro code behind button
How do I find out what macro and the code assigned to a specific button in an Excel worksheet? I can view all the macros assigned to the workbook, but it appears that there may be other macros running on these buttons (my personal list of macros is empty)(I am the author of the workbook). Right-click on button, assign macro. See that is assigned. If an ActiveX control, you may need to click on "view code". Alternatively, you can bring up the VBE (Alt+F11) and look through the different parts of your workbook to see what coding is in there. -- Best Regards, Lu...

What wrong is macro with signcert?
I have been setup signcert within office 2003, and assign its cert into macro, so I can skip the security pop up message whenever I open this file and it works properly. Recently, I need to assign password for my XP user account in order to enable hibernation mode, then when I open the worksheet, it pops message for macro security again, but this time, the select option is disable for always trust this cert, so I need to manually select enable macro. Does anyone have any suggestions on how to solve this signcert issue? Thanks in advance for any suggestions Eric When I re-create ...

macro results wrong
I recorded marcos in a workbook. I then saved the workbook uder a ne name . Naturauly I had to modify the macro ref file names to the new fil name. I can now run the macros , however I get the wrong results. example: i have this formular =if(data!c5=0,0,data!c5/data!d5) in the orignal workbook it works fine when I copy an autofill the fields in that column. In the new workbook the formular is right but th resutant value is a constant for all the auto filled cells!! eg. if th cell A1 = 3 all the other cells A2 , A3 , A4 are dispalying 3 enven the formula shows otherwise. Please help :co...

Excel / VBA
Hi, I am trying to find how to add or remove the description displayed on the "Macro" pop-up menu (Alt-F8). Generally macros recorded have a banale description giving the time/date & username, others that I write directly in the VBE have none. Can anyone point how to add/modify this description? thanks, Scott --- Message posted from http://www.ExcelForum.com/ Scott, When the macro recorder fires up, the first dialog allows you to put whatever description you want in, including none if so desired. The value gets saved as comments, but changing the comments does not chang...

Macro or Look-up?
Hello I am trying to update a worksheet to make it more efficient and easier to use. I would like one point of data entry for the final user, ‘hide’ the main formula worksheet, and then just have the printable, user-friendly formatted report sheet. I know a little about macros (but not so much in relation to VBA) and a little about other excel formulas (v-look up etc), but am not sure which way to go to solve this issue. Your help would be appreciated :o) The spreadsheet that I have contains a worksheet that lists data manually entered (from a range of different sources ...

Macro linking
I have doubt with macro coding. I have three macros to run. In first step: If user press a macro button it has to run the Macro1, after running this, there is one message box will popup asking for “Yes” or “No” Now question is If user select “Ok” it should run the macro2 and If user select “No” it should run the macro3. Just I want to know how to link the Macro 2 and Macro3 after message box message button. I hope this make sense. Regards, Vishu One way to do this is to write a "Master" macro that calls Macro1, Macro2, and Macro3 according to the logic you describe. Perhaps ...

Add formula to Macro???
How do I integrate a long custom formula in a macro ? The formula will be used to manipulate a column of data. Do I record myself actually typing the formula while I record the macro? Is there an easier way? Thanks Pls don't multipost. See ans in other post -- Don Guillett SalesAid Software dguillett1@austin.rr.com <mschmidt@carolina.rr.com> wrote in message news:1152448057.960877.195000@h48g2000cwc.googlegroups.com... > How do I integrate a long custom formula in a macro ? > > The formula will be used to manipulate a column of data. > > Do I record myself act...

Help Modifying Hyperlink Macro
Hello, I currently have the following macro that converts text to a hyperlink. Sub CovertTxt2Hyperlink() Dim cCell As Range Dim strHLinkBase As String strHLinkBase = "http://grow.hp.com/Saba/loginAsUser.jsp?deepLinkName=CourseDetail&deepLinkParams=courseId=" For Each cCell In Selection.Cells If cCell.Hyperlinks.Count = 0 Then On Error Resume Next ActiveSheet.Hyperlinks.Add _ Anchor:=cCell, _ Address:=strHLinkBase & cCell.Value, _ TextToDisplay:=cCell.Value cCell.NumberFormat = "@" 'Forma...

Macro to run based on criteria
Hi, i need a macro to run based on a criteria in A1. In A1 i have a dropdown list with sheets name. If i select in A1 the sheet John, and then i run the macro, i need the macro to copy some cells from the sheet John. If i select in A1 the sheet Mary, then the macro to copy from sheet Mary. Can this be done? Thanks! Yes. Try the below... With Sheets(CStr(Range("A1"))) ..Range("A1:A10").Copy Sheets("Sheet1").Range("B1") End With "puiuluipui" wrote: > Hi, i need a macro to run based on a criteria in A1. > In A1 ...

Running a macro depending on a cell value
Hi there, I have an interesting one here ... I have assigned a macro to a command button. However I want to control this macro not to happen, i.e. not to run on click of the command button, depending on the value of another cell. That is say cell a1 = 1 I want the macro to work on click of command_button1 if cell a1 = 1. But i do not want it to run, i.e. act as if there is no macro assigned to it, if cell a1 = 2 or any other number not 1. Can this be done. Would appreciate any suggestions Thanks in advance, Brian Sure you can do that with an If statement. Example: Sub Button2_...