+ Reply to Thread
Results 1 to 9 of 9

Type Mismatch in my code, whats wrong?

  1. #1
    Registered User
    Join Date
    02-11-2013
    Location
    Guernsey
    MS-Off Ver
    Excel 2010
    Posts
    80

    Type Mismatch in my code, whats wrong?

    Hi,

    I have the following code to activate when a cell is change on a particular sheet but it is resulting in a Run Time Error 13 Type Mismatch and when i hit Debug is just highlights the
    Please Login or Register  to view this content.
    line

    Please Login or Register  to view this content.
    It actually does what i want and pastes the data in to the Store Selection Cell C3 but then goes no further and debugs

    Any help much appreciated

    Simon

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Type Mismatch in my code, whats wrong?

    In the If statement it should be Target.Address


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

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

    Re: Type Mismatch in my code, whats wrong?

    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...

  4. #4
    Registered User
    Join Date
    02-11-2013
    Location
    Guernsey
    MS-Off Ver
    Excel 2010
    Posts
    80

    Re: Type Mismatch in my code, whats wrong?

    Query Message.jpg

    This is now coming up to do with my Query Parameters

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Type Mismatch in my code, whats wrong?

    what range are your parameters looking at?
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  6. #6
    Registered User
    Join Date
    02-11-2013
    Location
    Guernsey
    MS-Off Ver
    Excel 2010
    Posts
    80

    Re: Type Mismatch in my code, whats wrong?

    Just one cell range which is a drop down list of users names, it is still returning the values correctly but gives me that error message so stops the code completing

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Type Mismatch in my code, whats wrong?

    can you post a screenshot of the parameters dialog?

  8. #8
    Registered User
    Join Date
    02-11-2013
    Location
    Guernsey
    MS-Off Ver
    Excel 2010
    Posts
    80

    Re: Type Mismatch in my code, whats wrong?

    got it sorted now, thanks for helping out

  9. #9
    Registered User
    Join Date
    02-11-2013
    Location
    Guernsey
    MS-Off Ver
    Excel 2010
    Posts
    80

    Re: Type Mismatch in my code, whats wrong?

    Here's my code:

    Unfortunately i have had to settle for ensureing the workbook is saved with cell A1 of the Table Query selected otherwise the Selection.End.(XLDown) will not copy the correct range as i cannot select a certain cell as a starting point, rather annoying but oh well

    HTML Code: 

+ 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. whats wrong with my code
    By comp23 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-12-2012, 04:59 AM
  2. Whats wrong with my code
    By dougieg in forum Excel General
    Replies: 9
    Last Post: 06-28-2012, 12:12 PM
  3. Whats wrong with this code??
    By tlinton in forum Access Tables & Databases
    Replies: 5
    Last Post: 01-13-2012, 07:14 PM
  4. Whats Wrong With My Code Please?
    By GogsJames in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-10-2006, 11:27 AM
  5. Whats wrong with this code??
    By marksince1984 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-20-2006, 08:18 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