Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Can I Assign A User Defined Function To A Cell?
Wayne wrote:
Can I assign a user defined function to a cell? I have the function "=AUST_RWCFR_MAText" assigned to a textbox and it works well. However I don't seem to be able to assign this function to a cell. I get a #VALUE! error. How can I assign this function to a cell? You can fire code when the user selects a certain cell. Place this code in the /worksheet/ module: Option Explicit Private Sub Worksheet_SelectionChange _ (ByVal Target As Range) ' do something if user selects cell J10 If Not Application.Intersect _ (Target, Range("J10")) Is Nothing Then DoSomething End If End Sub The sub that does the real work can in any module you choose: Public Sub DoSomething() MsgBox "You selected J10." End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
User Defined FUNCTION | Excel Discussion (Misc queries) | |||
How to assign a short cut key for user defined word? | Excel Discussion (Misc queries) | |||
user defined function | Excel Worksheet Functions | |||
Color a result cell in a user defined function | Excel Discussion (Misc queries) | |||
user defined function help | Excel Worksheet Functions |