+ Reply to Thread
Results 1 to 6 of 6

Stephen Bullen's code modified for Excel 64 Bit (Win64 or VBA7)?

  1. #1
    Registered User
    Join Date
    06-27-2020
    Location
    Istanbul
    MS-Off Ver
    Excel 2016 Pro Plus 32 Bit
    Posts
    10

    Stephen Bullen's code modified for Excel 64 Bit (Win64 or VBA7)?

    I use Excel 2016 Pro Plus 32 Bit on Windows 10 Pro 64 Bit.
    I have developed an app of which the main feature is to load 7 main shapes filled with different colors on a UserForm controlled by two sliders. Horizontal slider changes the main shapes (1 to 7) whereas the vertical one changes their color over a range. I have produced the shapes in PowerPoint using basic Shape components and copied them to a Worksheet in the App Workbook. I have used Steven Bullen's code to load the BitMap images onto the Picture Control of the UserForm, which he wrote in 98 and the App works perfect this way in my computer.

    However when I sent it to a friend of mine who has Win-Excel 64 Bit he couldn't run it. I have been trying to fix the declarations (variables: Long to LongPtr and functions: to PtrSafe Functions) to match the Excel 64Bit version as recommended by MicroSoft and many others but somehow I cannot seem to get it run yet. Errors throw at different places of PastePicture and CreatePicture functions of S. Bullen's code..
    My priority is to get it run on Windows-Excel 64 version. If I can manage this the next target is to get it run on Mac-Excel 64 versions too..
    I appreciate any hint / suggestion to fix the above issue or even a different approach then mine. Thanks..

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,013

    Re: Stephen Bullen's code modified for Excel 64 Bit (Win64 or VBA7)?

    Quote Originally Posted by Leden View Post
    If I can manage this the next target is to get it run on Mac-Excel 64 versions too..
    Your chances of getting Windows API calls to work on a Mac are pretty small.

    For the 64bit PastePicture in Windows, there is a file here which claims to have code for both 32 and 64 bit: https://www.excelforum.com/excel-pro...ml#post4600354
    Last edited by romperstomper; 07-06-2020 at 08:48 AM.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    06-27-2020
    Location
    Istanbul
    MS-Off Ver
    Excel 2016 Pro Plus 32 Bit
    Posts
    10

    Re: Stephen Bullen's code modified for Excel 64 Bit (Win64 or VBA7)?

    Dear rorya,

    Thank you so much for your prompt response and comments.. Keags' revision to Stephen Bullen's code has worked just fine in my Excel 2016 64 Bit version..

  4. #4
    Registered User
    Join Date
    06-27-2020
    Location
    Istanbul
    MS-Off Ver
    Excel 2016 Pro Plus 32 Bit
    Posts
    10

    Re: Stephen Bullen's code modified for Excel 64 Bit (Win64 or VBA7)?

    I must also thank Keags here for his valuable contribution...

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,013

    Re: Stephen Bullen's code modified for Excel 64 Bit (Win64 or VBA7)?

    I hope you mean xlnitwit’s code. Keags original code was not correct and will crash at some point.

  6. #6
    Registered User
    Join Date
    06-27-2020
    Location
    Istanbul
    MS-Off Ver
    Excel 2016 Pro Plus 32 Bit
    Posts
    10

    Re: Stephen Bullen's code modified for Excel 64 Bit (Win64 or VBA7)?

    I've checked that again and got your point but Keags' first version seemed to work for me.
    However, I will use xlnitwit's revision to be on the safe side.. Thanks for reminding me.

+ 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. VBA7 compatibility question - Get UNC drive name
    By pinebush in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-15-2019, 11:49 AM
  2. modify code from export to excel to secured pdf that can't modified
    By mazan2010 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-30-2017, 05:08 AM
  3. Stephen Bullen's Code for Pasting Picture
    By shamsul in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-23-2016, 10:04 AM
  4. [SOLVED] GetLongPathName - VBA7 / 64 bit version?
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-12-2015, 08:26 PM
  5. I have a macro that work properly in Win32 but not in Win64!!
    By karimretina in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-22-2013, 05:54 PM
  6. Stephen Bullen FormFun
    By RB Smissaert in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-22-2005, 10:06 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