+ Reply to Thread
Results 1 to 7 of 7

How to remove a User Defined Function please

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-15-2016
    Location
    Gold Coast Australia
    MS-Off Ver
    Microsoft Office Professional Plus 2021
    Posts
    147

    How to remove a User Defined Function please

    Hi

    I entered my first User Defined Function so I could use this formula "US2DEC" in excel.

    I followed these instructions ...

    Go to the Visual Basic editor (Alt + F11) and copy and paste the function below

    Code:

    Function US2DEC(US) as Double

    If US < 0 Then
    US2DEC = 1 / (US / (US -100))
    Else
    US2DEC = 1 / (100 / (US + 100))
    End If

    End Function

    I used Alt+F11 to open the editor and Pasted all the code in the blank space that was just opened.
    I closed the editor and saved the workbook as a macro enabled workbook (.xlsm extension).

    However when I enter any information now I get ...

    Ambiguous name detected: US2DEC

    I can't get back to the module I created to delete it.

    I was better off just to enter the formula manually.

    Can anyone help please?

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: How to remove a User Defined Function please

    US2DEC will not interfere with the normal excel function unless you call it with an argument. It sits ideally until it has been called. You might have two defined functions with the same name. Where is the code saved? Is it on the standard module or worksheet (Workbook)?
    You can delete it by right clicking the module.
    Last edited by AB33; 07-27-2016 at 03:34 PM.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How to remove a User Defined Function please

    I think the easiest way to get rid of it is to Re-Save the file as a NON Macro Enabled workbook (.xlsx)
    You'll get warnings that macros will be deleted, let it save anyway.

  4. #4
    Forum Contributor
    Join Date
    04-15-2016
    Location
    Gold Coast Australia
    MS-Off Ver
    Microsoft Office Professional Plus 2021
    Posts
    147

    Re: How to remove a User Defined Function please

    Thanks for the fast reply Jonmo...

    I actually tried that before and just tried again and the window still comes up when I enter a new value.

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How to remove a User Defined Function please

    You'd have to then CLOSE the book, and RE-Open the new book (with the .xlsx extention)

  6. #6
    Forum Contributor
    Join Date
    04-15-2016
    Location
    Gold Coast Australia
    MS-Off Ver
    Microsoft Office Professional Plus 2021
    Posts
    147

    Re: How to remove a User Defined Function please

    That worked fine.

    Thanks so much for your help.

    Sorry for the newb question.

    Rep added.

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: How to remove a User Defined Function please

    You're welcome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Usage of standard functions into custom function (or user defined function)
    By tusharb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-13-2016, 12:43 AM
  2. COUNTIF/COUNTIFS function + nested user-defined function
    By shamjamali in forum Excel General
    Replies: 1
    Last Post: 05-12-2015, 09:12 PM
  3. [SOLVED] User defined function returns an error on a standard function used in it.
    By pb48 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-23-2013, 01:35 PM
  4. User Defined Function Add-ins
    By ot070707 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-04-2011, 11:26 AM
  5. User Defined Function
    By Frank e in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-15-2008, 10:58 AM
  6. Excel - User Defined Function Error: This function takes no argume
    By BruceInCalgary in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2006, 04:05 PM
  7. Need to open the Function Arguments window from VBA for a user defined function.
    By korrin.anderson@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-20-2006, 10:55 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1