|
[广告] VBA代码宝 - VBA编程加强工具 · VBA代码随查随用 · 内置多项VBA编程加强工具 ★ 免费下载 ★ ★ 使用手册★
Private Sub CommandButton1_Click()
Call QRMain(TextBox1.Value)
Call CreateBitmapQRCode(RGB(0, 0, 0), RGB(255, 255, 255))
Call QRCodeToClipboard
Image1.Picture = QRCodeToPicture
ActiveSheet.Range("J1").Select '选中粘贴位置
ActiveSheet.Paste '粘贴剪切板内的图片
Application.CutCopyMode = False
With Selection '设置图片:位置和大小
.ShapeRange.Height = 99
.ShapeRange.Width = 99
End With
Dim b2() As Byte
Dim s As String
Dim i As Long, m As Long
' For i = 0 To cmb1.UBound
' If cmb1(i).ListIndex < 0 Then Exit Sub
' Next i
s = TextBox1.Text
m = Len(s)
i = m * 3 + 64
ReDim b2(i)
s = StrConv(TextBox1.Text, vbFromUnicode)
b2 = s
m = LenB(s)
SavePicture Image1.Picture, ThisWorkbook.Path & "\二维码\" & Format(Now, "MMDDHHMM") & ".jpg"
Unload UserForm9 '//关闭窗体
End Sub
|
|