+ Reply to Thread
Results 1 to 3 of 3

EoMonth function not working help

  1. #1
    Registered User
    Join Date
    03-05-2014
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    5

    EoMonth function not working help

    Hi Everyone,

    I have used the EoMonth function in macro and its not working. I have referenced the Analysis Tool - VBA through File---->options --->Addins. Below is the macro i have written. I am Beginner in writing macros.

    Sub done()
    Dim Dat As Date, x As Integer, y As Date
    Dat = Format(Now(), "mmm - dd - yyyy")
    x = Month(Dat)
    y = EoMonth("dat", x)
    MsgBox Dat
    MsgBox x
    Msgbox y
    End Sub

    When i run the above script i am getting the error message as "Compile Error: Sub or Function not Defined"
    Attached Images Attached Images

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,644

    Re: EoMonth function not working help

    1) use code tags (edit your post to comply with forum rules.
    2) Try
    Please Login or Register  to view this content.
    or rather
    Please Login or Register  to view this content.
    as you want to pass value of dat variable not text string "dat" :
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    03-05-2014
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: EoMonth function not working help

    Thanks for helping me

+ 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. eomonth quit working
    By foxguy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-02-2011, 07:09 PM
  2. [SOLVED] Problem with EOMONTH function in VB
    By Alf in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 10-02-2010, 04:28 PM
  3. links / EOMONTH function
    By drecollet in forum Excel General
    Replies: 8
    Last Post: 10-01-2007, 01:10 PM
  4. Step 1: EOMONTH Function
    By dstock in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-24-2005, 12:52 PM
  5. How do you use the Excel EOMONTH function in VBA?
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-04-2005, 07:48 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