+ Reply to Thread
Results 1 to 10 of 10

Run-time error '1004': Method Range of object_Worksheet Failed (because of wrong code)

  1. #1
    Registered User
    Join Date
    12-29-2010
    Location
    Italy
    MS-Off Ver
    Excel 2003
    Posts
    34

    Run-time error '1004': Method Range of object_Worksheet Failed (because of wrong code)

    Hello to the board!

    Anyone can say what in this code is wrong, please?
    Please Login or Register  to view this content.
    I take this when try to save: Excel Wrong Code - 2018-11-13_11-36-42.png

    Thanks in advance!
    Last edited by milt2010; 11-13-2018 at 08:48 AM. Reason: Correction in the title of post

  2. #2
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    25,693

    Re: Wrong code

    There's nothing obvious.

    Would you upload the workbook so that we can see the problem in context.
    Richard Buttrey

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    12-29-2010
    Location
    Italy
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Wrong code

    https://mega.nz/#!fwpUyQaB!7-R5eMij6...ie89BKB0XroIvU

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 2019
    Posts
    15,955

    Re: Wrong code

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem - not what you think the answer might be. (think google search terms?). Once you have done this please send me a PM and I will remove this request. (Also, include a link to your thread - copy from the address bar)

    Many members search our previous posts, and thread titles play a big part of the search. I doubt anybody would do a search based on your title?

    To change a Title on your post, click EDIT POST then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (note: this change is not optional )

  5. #5
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    25,693

    Re: Wrong code

    ...and after the change of Title, would you upload to this forum rather than a file hosting site please.

  6. #6
    Registered User
    Join Date
    12-29-2010
    Location
    Italy
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Wrong code

    As I explain to alansidman, in a PM I can't at this moment to change the title because I really don't know where or what is the problem! Only when I try to save I take a "wrong message"... Also, offcourse, I tried to send by the site, but, from the Attachment is impossible... ExcelForum 2018-11-13_14-09-49.png

  7. #7
    Registered User
    Join Date
    12-29-2010
    Location
    Italy
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Wrong code

    Finally I find how to send the file...
    Attached Files Attached Files

  8. #8
    Forum Moderator Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Excel for Windows & Mac - all versions.
    Posts
    25,693

    Re: Wrong code

    Hi,

    I don't encounter any problem with the code. I notice that you no longer have the 2nd line beginning ActiveSheet.Protect in your first post

    Would you clarify when the problem arises.

  9. #9
    Registered User
    Join Date
    12-29-2010
    Location
    Italy
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Run-time error '1004': Method Range of object_Worksheet Failed (because of wrong code)

    Hello,
    I actually deleted the second line because it creates another problem: it does not allow me to use a function (a column that works as a hyperlink to open another worksheet in the same workbook). This is the piece of code I'm talking about: Hyperlink Code2.png. And, in general, with the protected worksheet, it blocks me several other functions (maybe the security string should be improved ... I do not know. But with or without this line (the protection line), the problem (Runtime error...) still appears. It appears only when I save the workbook from the Visual Basic Window. I re-send the same file with the protection line I had removed.
    Thank you for the help!
    Attached Files Attached Files
    Last edited by milt2010; 11-13-2018 at 04:31 PM.

  10. #10
    Registered User
    Join Date
    12-29-2010
    Location
    Italy
    MS-Off Ver
    Excel 2003
    Posts
    34

    Re: Wrong code

    It seems that the problem is due to the code to display the date of the save. After deleting it, the "runtime error ..." no longer appears. Is there a way I can use to correct instead of deleting the save date code? http://bit.ly/2PvIQgq

+ 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