PC Review


Reply
Thread Tools Rate Thread

add-in question

 
 
ljb
Guest
Posts: n/a
 
      13th Nov 2003
I have written an add-in with a function that needs to be triggered by a
Worksheet_Change event. Can I put the event code in the add-in and have it
available to new worksheets? If not how do I call a function in the add-in
from my new worksheet? I've tried

Private Sub Worksheet_Change(ByVal Target As Range)
GetColors Target
End Sub

but Excel doesn't seem to know where to find GetColors.

thanks
LJB


 
Reply With Quote
 
 
 
 
ljb
Guest
Posts: n/a
 
      13th Nov 2003
I found part of my answer. The only question now is how to include and
reference an even function in an add-in?

Private Sub Worksheet_Change(ByVal Target As Range)
Application.Run "'my lookup.xla'!getcolors", Target
End Sub

LJB


 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      14th Nov 2003
If your addin has a nice unique project name (not VBAProject), then you can open
the other workbook and with that project active, tools|references and point at
the addin.

Then you can call "getcolors" just like it's a built in VBA function.

(Were you using reference in this sense?)

ljb wrote:
>
> I found part of my answer. The only question now is how to include and
> reference an even function in an add-in?
>
> Private Sub Worksheet_Change(ByVal Target As Range)
> Application.Run "'my lookup.xla'!getcolors", Target
> End Sub
>
> LJB


--

Dave Peterson
(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Perhaps and off topic question....but could use some help with video question.....I don't need codec help, just a general question. Bret Miller DIY PC 0 13th Oct 2006 12:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:18 PM.