+ Reply to Thread
Results 1 to 9 of 9

This code not working in Excel 2010 *SOLVED*

  1. #1
    Forum Contributor
    Join Date
    12-11-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    517

    This code not working in Excel 2010 *SOLVED*

    Hello everyone, i recently upgraded my excel from 2007 to 2010 and now this code is not working for some reason. Any help would be appreciated, thanks.

    Error msg is "Can't find project or library"

    =>Private Sub Worksheet_Change(ByVal Target As Range)
    Col = Left(Target.Address, 2)
    If Col = "$E" Then Target.Offset(0, -4) = Now
    If Target.Column = 5 And Len(Target.Address) > 0 Then

    If Evaluate("Countif(E:E," & Target.Address & ")") > 1 Then
    MsgBox "Duplicate Entry. Removed.", vbExclamation, "Duplicate URL"
    Range(Target.Address).EntireRow.ClearContents

    End If

    End If
    End Sub
    Last edited by biznez; 12-06-2013 at 02:13 PM.

  2. #2
    Registered User
    Join Date
    08-11-2013
    Location
    leeds
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: This code not working in Excel 2010

    Sounds like a missing reference library.


    From VBA editor... Goto Tools, references and see what is listed as missing. It will probabbly be an office.12 library and just needs the same office.15 library selecting

  3. #3
    Forum Contributor
    Join Date
    12-11-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    517

    Re: This code not working in Excel 2010

    Quote Originally Posted by notreallyIT View Post
    Sounds like a missing reference library.


    From VBA editor... Goto Tools, references and see what is listed as missing. It will probabbly be an office.12 library and just needs the same office.15 library selecting
    Thanks for the quick reply. when i goto references and the only thing that is listed as missing is "MISSING: Microsoft Calendar Control 2007" and this box is checked

  4. #4
    Registered User
    Join Date
    08-11-2013
    Location
    leeds
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: This code not working in Excel 2010

    Then you may have a head-ache to combat. I have had many problems with calendar controls (as many have).

    I stopped using microsoft calendar controls a long time ago. You can download all the different versions but I would personally swap all uses of calendar control for one of the very good date picker userforms available online. They are built to work with native controls, so no worry that anyone you send this workbook to wont have the required controls.


    I will post a link shortly

  5. #5
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Uncheck it.
    If posting code please use code tags, see here.

  6. #6
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: This code not working in Excel 2010

    You don't need the col variable at all. Try:

    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  7. #7
    Registered User
    Join Date
    08-11-2013
    Location
    leeds
    MS-Off Ver
    Excel 2007
    Posts
    30

    Re: This code not working in Excel 2010

    http://www.gmayor.com/Zips/MSCAL.zip

    That is the original calendar control file if you decide to try and install it.

    https://sites.google.com/site/e90e50...er-Popup-Form-

    Thats the datepicker userform I use most. Download the simple datepickerform, change a few lines of code and you should be away.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: This code not working in Excel 2010

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

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

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  9. #9
    Forum Contributor
    Join Date
    12-11-2009
    Location
    Toronto
    MS-Off Ver
    Excel 2010
    Posts
    517

    Re: This code not working in Excel 2010

    Quote Originally Posted by Norie View Post
    Uncheck it.
    Thanks Norie, this worked perfectly!

+ 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] Code to Combine Worksheets in Excel 2010 Not working
    By jcicero57 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2013, 02:09 PM
  2. VBA code created in Excel 2003, not working in Excel 2010, Getting error message 400.
    By rajeshapril14 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-24-2012, 05:19 AM
  3. [SOLVED] Code not working in excel 2010
    By annpricks in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-02-2012, 08:40 AM
  4. Code From 2003 to 2010 excel not working
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-20-2011, 12:41 PM
  5. email code not working properly in excel 2010
    By techmob in forum Excel General
    Replies: 19
    Last Post: 01-05-2011, 05:37 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