Results 1 to 3 of 3

Thread: How To Make A Custom VBA Function Available In All Workbooks

  1. #1
    Member
    Join Date
    Jun 2012
    Posts
    39
    Rep Power
    0

    Question How To Make A Custom VBA Function Available In All Workbooks

    I have made a custom function using VBA and I need to make it work in my workbook.
    While entering this function will the excel show the arguments to be entered like the in-built functions?
    What are the other things that I need to take care of?
    Following is the vba code for the custom function.

    Code:
    Function wdvdep(historical_cost As Long, accumulated_depreciation As Long, addition_value As Long, date_of_purchase As Date, dep_date As Date) As Long
    Dim h As Long
    Dim Acc As Long
    Dim Addn As Long
    Dim Rt As Long
    Dim dt As Date
    Dim depval As Long
    Dim depdt As Date
    
    depval = h - Acc
    If (depdt - dt) > 180 Then
    dep = (depval + Addn) * Rt%
    Else
    dep = depval * Rt% + Addn * Rt% / 2
    End If
    End Function
    Last edited by Admin; 04-11-2013 at 12:13 PM. Reason: code tag added

  2. #2
    Member
    Join Date
    Jun 2012
    Posts
    39
    Rep Power
    0
    Also I need this function to work in every system I install the code similar to an add-in. Is it possible?

  3. #3
    Member
    Join Date
    Jun 2012
    Posts
    39
    Rep Power
    0
    I got the problem resolved myself. Sorry guys.

Similar Threads

  1. Split Workbook into Separate Workbooks VBA
    By Admin in forum Download Center
    Replies: 12
    Last Post: 08-08-2018, 09:33 PM
  2. How to Add Custom List And Use in Custom Sorting
    By Transformer in forum Tips, Tricks & Downloads (No Questions)
    Replies: 0
    Last Post: 06-07-2013, 10:41 PM
  3. Replies: 2
    Last Post: 05-13-2013, 12:03 AM
  4. How to make Dynamic range (width) with OFFset function
    By Rajesh Kr Joshi in forum Excel Help
    Replies: 12
    Last Post: 12-01-2012, 11:03 PM
  5. Remove Unused Custom Styles VBA
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 08-23-2012, 02:32 PM

Posting Permissions

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