+ Reply to Thread
Results 1 to 8 of 8

Getting error number 1004

  1. #1
    Registered User
    Join Date
    12-22-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010
    Posts
    10

    Getting error number 1004

    Hi All,

    I have written the below function
    Please Login or Register  to view this content.
    While executing I am getting error number 1004. Can any one help me to resolve this issue?
    Last edited by vlady; 12-23-2012 at 09:38 PM.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Getting error number 1004

    Hi destiny,

    Try qualifying your assignment:
    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    12-22-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010
    Posts
    10

    Re: Getting error number 1004

    Nope same error

  4. #4
    Registered User
    Join Date
    12-22-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010
    Posts
    10

    Re: Getting error number 1004

    Attached the workbook for reference.
    Attached Files Attached Files

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Getting error number 1004

    UDFs can't be used to alter values on a worksheet.
    If posting code please use code tags, see here.

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Getting error number 1004

    Hi Destiny4me,

    I may have figured it out - the error will always be generated, but we don't need to see it since the macro works this way:

    Put the change code in the sheet1 module and comment out the error message:

    Please Login or Register  to view this content.
    in sheet1

    Please Login or Register  to view this content.
    in module 1

  7. #7
    Registered User
    Join Date
    12-22-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010
    Posts
    10

    Re: Getting error number 1004

    it works

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Getting error number 1004

    Yeah, sometimes the VBE protests too much

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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