LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Executing code in a library as a result of a worksheet change

I have a sub held in a module within a add in library (xla) called
calcForeign.

I want to execute this sub when a specific cell changes value. Heres my
code to spot the change on the worksheet

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$U$28" Then
Application.EnableEvents = False
'execute my sub
calcForeign

Application.EnableEvents = True
End If
End Sub

However excel will not find this sub - i get "compile error sub or
function not defined"

I can add a button to the sheet and assign the following macro
'C:\OrderIT\OrderITAddin.xla'!calcForeign
and it works OK

How do i reference a sub held in an xla Library?

Gratefull for any help

Regards

Ian

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change #DIV/0! result for an entire worksheet ? LG Excel Discussion (Misc queries) 4 May 26th 06 07:45 PM
Code Conflicts With Worksheet Change Code Paige Excel Programming 3 March 3rd 06 04:25 PM
do anybody have a sample code for executing excel macro from vb code?<eom B Deepak Excel Programming 2 September 30th 05 09:59 AM
Code not executing iwrk4dedpr[_6_] Excel Programming 3 June 3rd 04 07:48 AM
Code Changes Not Executing Justin[_8_] Excel Programming 1 October 24th 03 02:31 AM


All times are GMT +1. The time now is 06:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"