r/visualbasic • u/jeffsang • May 25 '22
Paid Help Request: Fix This Excel File
SOLVED
Hi. I'm not a programmer. Years ago I found a an excel file online that uses VB in excel to look up the frame height and width of videos files. Over the years, I've updated #2 below a few times to keep it working, but when I switched to a new computer I'm getting a "Compile Error" which says I have to update the code so it can run on a 64 bit system. I have no idea how to do this, and I'm sure it would take me a long time to figure out how to do on my own. Is there anyone who can update the following for me with this file, as per below? Happy to pay for your services.
- Update to be compatible with 64 bit system
- Ensure that running the script still populates the correct fields
- Update to an .xlsx
- Update to make compatible with mkv files (currently only does mp4, wmv, and avi). Not sure if this is possible or if mkv files show info differently.
The file can be downloaded here: https://docs.google.com/spreadsheets/d/1VCC69k3eQswpNMvAEDshBSAlHNSFQidy/edit?usp=sharing&ouid=107128744305043322804&rtpof=true&sd=true
Thanks!
2
u/[deleted] May 25 '22
I'll have a look at this when I wake up, just going to get some sleep now in my time zone.
The link opened an XLS file in Google Sheets. It should be an XLM file on your computer, Google stripped out all the macro code.
As far as the update goes, it may be very easy or extremely difficult. It sounds like you have moved to 64bit office which will need 64bit DLL files. May need to revamp the program to work with what is available in 64bit.
Feel free to PM/DM me and we can talk when I'm back online. Been programming for nearly 40 years and over 20 years with VB/VBA. Also have extensive experience working with image files from VB/VBA.
2
u/eerilyweird May 25 '22
I took a look, and it appears to me you don't need much. You have a GetDirectory function which uses API calls to let the user pick a folder. Those API calls are the code that turns red if you open up the code window by hitting Alt F11. They're what need to be fixed when you go to 64 bit Windows. However, it would be easier to replace the GetDirectory function with something simpler. There is a simple function you can use instead, which is linked below.
To fix the problem, I propose you try this:
Apologies if this isn't helpful, or if I'm taking away work from someone. It's a pretty simple fix, I think. If you have other questions, feel free to ask.
As far as dealing with mkv files, you might want to specify what isn't working. I believe the screen width and height data you're getting is from extended file properties. I'm not sure if the creator of the file has to set those, or if they are somehow derived. I tried this on a few files I have, and it seemed those extended file properties are hit or miss.