用宏代码生成二维码,先输入A1、A2、A3单元格内容,再运行宏代码即可在A4得到扰凯二维码
请点击输入图片
图滑派片代码看不太清,粘贴代码给你可直接复缓让唤制
Sub 生成二维码()
Dim Qr As OLEObject, Ra As Range, Ra2 As Range, Wh
Dim M%, I%, Ro&, S$, S1$, N&
For Each Qr In ActiveSheet.OLEObjects
Qr.Delete
Next
S = Range("A1") & Chr(10) & Range("A2") & Chr(10) & Range("A3")
Set Ra = Range("A4")
Wh = Application.Min(Ra.Width, Ra.Height) - 4
Set Qr = ActiveSheet.OLEObjects.Add(ClassType:="QRMAKER.QRmakerCtrl.1", Link:=False, _
DisplayAsIcon:=False, Left:=Ra.Left + 2, Top:=Ra.Top + 2, Width:=Wh, Height:=Wh)
Qr.Name = "Qr1"
Qr.Object.AutoRedraw = 1
Qr.Object.InputData = S
End Sub