Hi Philip, have you done any work with QR codes, I need a solution which allows me to link to a cell value and update the QR when the cell value changes.
Hi Andy,
no not really. Do you already have code for this?
Phil
I have tried every one I can find on Google to no avail. They all run with errors.
This sheet, (just a test sheet) has two different macros which should do it but neither work one via the button and the other with a call.
Hi Andy,
Where did you get this code? Did you get that workbook like that? It's a bit messy!
There are 4 modules and 3 Subs with the same name so that's why the code isn't working.
Attached is a working version. Put the text to encode into G2. If you look at the Render_QRCode sub in Module 3 you'll see that it is set to pickup the value in G2. You can change this to whatever cell you like.
Cheers
Phil
Phil, thankyou so much for your help with this, it works perfectly. 🙂
No worries.
Hi Phil,
Excuse my budding in but I was trying to help someone of the Excel Help Forum ( https://www.excelforum.com/excel-programming-vba-macros/1330377-require-vba-code-for-qr-code-new-post.html )
The texts this person is using somehow throws an error and shuts down Excel.
I tested the text with your file here and the same issue. No error message just bang - Excel shuts down and restarts
this is the text to create QR code
FIN STAT SALE NP 0 CA 0 LOAN INVEST DRS Cash in Hand Cash @ Bank Balance 0 Depreciation 0 Closing WDV 0 HP 80C 0 Ch VI 0 Tax Payble 0 |
Just curious what it could be.
Cheers,
Hans
Hi Hans,
It appears to have something to do with the length of the string. If you split the string into 2, both halves encode without issue.
I haven't figured out why it crashes with the full string. I'm not familiar with the VBA, it was in the file supplied for this particular problem.
Phil
Hi Phil,
I figured out that much, passing shorter strings had no problems and also the text in the string is not really something I would use in a QR-code either.
Was just curious; anyway I could not find a text length limit to QR-code gerenation.
Thanks for looking.
This is (for me at least) no longer an issue
Cheers and keep safe,
Hans