Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Add Image for Excel Command
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Nikee  
View profile  
 More options Jul 13 2012, 12:05 pm
From: Nikee <ocean.ind...@gmail.com>
Date: Fri, 13 Jul 2012 09:05:05 -0700 (PDT)
Local: Fri, Jul 13 2012 12:05 pm
Subject: Add Image for Excel Command

I have two ExcelCommand; they appear under in AddIn Ribbon in Excel. I want
to assign Image for both of them. How can I do this ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Patrick O'Beirne  
View profile  
 More options Jul 13 2012, 12:12 pm
From: "Patrick O'Beirne" <obeirne....@gmail.com>
Date: Fri, 13 Jul 2012 17:12:56 +0100
Local: Fri, Jul 13 2012 12:12 pm
Subject: Re: [ExcelDna] Add Image for Excel Command
On 13/07/2012 17:05, Nikee wrote:

> I have two ExcelCommand; they appear under in AddIn Ribbon in Excel. I
> want to assign Image for both of them. How can I do this ? --

   somesheet.Shapes(somename).Copy

   commandbarobject.controls(itsname).PasteFace

or   to use a builtin MS face id
commandbarobject.controls(itsname).FaceId = 123


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nikee  
View profile  
 More options Jul 13 2012, 2:36 pm
From: Nikee <ocean.ind...@gmail.com>
Date: Fri, 13 Jul 2012 11:36:00 -0700 (PDT)
Subject: Re: [ExcelDna] Add Image for Excel Command

I did not get you. I have added ExcelCommand through ExcelDna...

When can I add this below code ? In AutoOpen ?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Patrick O'Beirne  
View profile  
 More options Jul 16 2012, 5:51 am
From: "Patrick O'Beirne" <obeirne....@gmail.com>
Date: Mon, 16 Jul 2012 10:51:43 +0100
Local: Mon, Jul 16 2012 5:51 am
Subject: Re: [ExcelDna] Add Image for Excel Command
On 13/07/2012 19:36, Nikee wrote:

> I did not get you. I have added ExcelCommand through ExcelDna...

> When can I add this below code ? In AutoOpen ?

Yes. I use the Ribbon class so had to try this in 2003 before posting:
Copied from a 2006 sample Dna project and amended:

<DnaLibrary Description="Sample Add-In">
  <Project Language="VB">
  <![CDATA[
    ' This class implements the ExcelDna.Integration.IExcelAddIn interface.
    ' This allows the add-in to run code at start-up and shutdown.

Class StartUp
     Implements IExcelAddIn
     Public Sub Start() Implements IExcelAddIn.AutoOpen
         ExcelDnaUtil.Application.commandbars("&My Menu").controls("Ring
&Bell").FaceID=273
         ExcelDnaUtil.Application.commandbars("&My Menu").controls("Say
&Hello").FaceID=59
     End Sub
     Public Sub Close() Implements IExcelAddIn.AutoClose
         'Fires when addin is removed from the addins list but not when
excel closes
         ' - this is to avoid issues caused by the Excel option to
cancel out of the close after the event has fired.
         MsgBox("Bye bye, from my DNA addin")
     End Sub
End Class

  Public Module MyTestFunctions

   Function GetTheExcelVersion() as string
   GetTheExcelVersion = ExcelDnaUtil.Application.Version
   End Function

   ' An easy way to add a menu and menu items for a command....
   ' This command sounds a tone and sets cell C3 to the value 42
   <ExcelCommand(MenuName:="&My Menu", MenuText:="Ring &Bell")> _
   Sub RingBell()
   Console.Beep()
   Dim r as New ExcelReference(3,3)
   r.SetValue(42)
   End Sub

   <ExcelCommand(MenuName:="&My Menu", MenuText:="Say &Hello")> _
   Sub SayIt()
   MsgBox("Hellooooo!")
   End Sub
end module
   ]]>
   </Project>
   </DnaLibrary>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »