Home > database >  Don't understand, you have to god for help!! EXCEL spreadsheet will generate qr code, but alway
Don't understand, you have to god for help!! EXCEL spreadsheet will generate qr code, but alway

Time:09-23

using the Internet to look small programs and bend the small code, you can now use macros to EXCEL spreadsheet has chosen content content after the merger will combine to generate a qr code
But now with WeChat sweep the yard in both English and Chinese are ok
Use sogou browser after sweeping Chinese all gibberish, tragedy is to sweep our company code machine swept in Chinese is also the code
I guess the cause of the utf-8 does not support? But I will EXCEL in utf-8 code generated after still garbled

Ask god help me
Using QRMAKER. Exe
Here is a small system software download address
http://pan.baidu.com/s/1i3slZeP

If there is other way, without this small software, pursuing big religion teach me!!!!!!!!

Now the code is as follows:

Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal hHandle As Long, ByVal dwMilliseconds As Long) As Long
Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Point01 As Long, Point02 As Long, Point03 As Long
Private As Integer I

Sub makeQRcode ()

Dim x, y, I As an Integer

X=ActiveCell. Row
Y=ActiveCell. Column
P=Selection. Rows. Count
Q=Selection. The Columns. The Count

For u=1 To p Step 1

A=Cells (x, y)
For I=1 To Step 1 q - 1

Cells (x, y)=Cells (x, y) & amp; "# #" & amp; Cells (x, y + I)


Next I
Cells (x, y + q + 1)=Cells (x, y)

If Dir (" D: \ QRmake exe ")="" Then
MsgBox "QRmake. Exe file is missing, please confirm!" Externally, vbCritical, "a program"
The Exit Sub
End the If
I=MK_QR (Cells (x, y), "10", "3", x, y, q)
Cells (x, y)=a

X=x + 1
The Next u
End Sub

The Function MK_QR (Enc_Dat, ECL, SIZ, x, y, q)
Dim F_Name As String
F_Name="[" & amp; ActiveWorkbook. Name & amp;"] "& amp; ActiveSheet. Name & amp; "!" & ActiveCell. Address
Point01=Shell (" "" "& amp; "D: \ QRmake. Exe" "" & amp; "/S" & amp; SIZ & amp; "/" L & amp; ECL + 1 & amp; "/" O "" & amp; ThisWorkbook. Path & amp; "" & amp; F_Name & amp; ". BMP "/" T "" "& amp; Enc_Dat & amp; "" "")
Point02=OpenProcess (& amp; H100000, 1, Point01)
Point03=WaitForSingleObject (Point02, & amp; HFFFFFFFF)
Point03=CloseHandle (Point02)
Point01=Empty
Point02=Empty
Point03=Empty
Cells (x, y + q). Select
With ActiveSheet. Pictures. Insert (ThisWorkbook Path & amp; "" & amp; F_Name & amp; ". BMP ")
. Left=ActiveCell. Left
. The Top=ActiveCell. Top
End With
'would have been generated qr code image to delete
The Kill (ThisWorkbook Path & amp; "" & amp; F_Name & amp; ". BMP ")
ActiveCell. Offset (0, 1). Select
End the Function


CodePudding user response:

Problems I also like you, too, don't know how to solve, you solved now?

CodePudding user response:

Hello, I also met the same problem, when I was 17 years to solve this problem, but didn't touch to fast for two years now all forget, how also can't remember how to solve now, if you have found the solution, could you please tell me, thank you,
  • Related