Results 1 to 10 of 10

Compile Error Type Mismatch

Threaded View

tony-heaton Compile Error Type Mismatch 06-23-2021, 07:42 PM
6StringJazzer Re: Compile Error Type... 06-23-2021, 08:25 PM
tony-heaton Re: Compile Error Type... 06-23-2021, 08:44 PM
6StringJazzer Re: Compile Error Type... 06-23-2021, 10:49 PM
tony-heaton Re: Compile Error Type... 06-24-2021, 08:50 AM
6StringJazzer Re: Compile Error Type... 06-24-2021, 11:32 AM
tony-heaton Re: Compile Error Type... 06-24-2021, 11:39 AM
6StringJazzer Re: Compile Error Type... 06-24-2021, 12:08 PM
tony-heaton Re: Compile Error Type... 06-24-2021, 03:04 PM
tony-heaton Re: Compile Error Type... 06-25-2021, 04:10 AM
  1. #1
    Registered User
    Join Date
    06-23-2021
    Location
    Windsor UK
    MS-Off Ver
    Office365
    Posts
    15

    Compile Error Type Mismatch

    Evening Ladies & Gents,

    Wonder if some genius could help me out.

    I would classify myself as a less than a beginner as truth be told, I know nothing of VBA but have dabbled with some borrowed code to get things going on other spreadsheets.

    I have an inherited Excel sheet that uses VBA to communicate with GPI devices to get data and also to get screen shots.

    I have 2 laptops to use on 2 identical test stations BUT 1 laptop uses 32 bit and the other uses 64 bit Excel.

    For the main routine (changing settings and getting data etc) I have already used the Declare PtrSafe so that the macros run this stage without issue.

    However, the macro that gets the screen grab obviously fails with the above error on the 64 bit version of Excel. Section of the code below :

    When I run the macro, it stops at the "ArrayPtr(0) = VarPtr(length)" with the VarPtr highlighted. Also the actual Sub name is highlighted in yellow (if that helps at all)

    I even downloaded the Microsoft win32api helpfile but that confused me even more.

    Hoping that its a simple fix, I place myself in your hands !

    Thank You

    Tony
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Compile Error Type Mismatch
    By Noannish in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-17-2020, 06:22 PM
  2. Getting compile error 'type mismatch
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2017, 06:35 AM
  3. Getting compile error 'type mismatch'
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-14-2015, 09:27 AM
  4. [SOLVED] Getting compile error type mismatch
    By mso3 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-16-2015, 05:03 AM
  5. [SOLVED] Compile error: Type mismatch
    By jacob@thepenpoint in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-10-2014, 09:41 AM
  6. Compile Error - Type Mismatch
    By Will B in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2012, 11:17 AM
  7. [SOLVED] Help: Compile error: type mismatch: array or user defined type expected
    By lvcha.gouqizi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2005, 05:05 PM

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