|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
'Set DotRng = Sht.Cells(Y * 1 + 1, X * 1 + 1)
'DotRng.Resize(1, 1).Interior.Color = RGB(0, 0, 0)
这些代码是做什么用的?
Sub TestSaveQrcodePicture()
Dim Pic As StdPicture
Set Pic = GetQrcodePic("testabc")
'SavePicture Pic, Application.ActiveWorkbook.Path & "\qrimg.bmp"
SavePicture Pic, Application.ActiveWorkbook.Path & "\qrimg.emf"
MsgBox "ok"
End Sub
Private Sub QRDraw(Data As String)
Dim X As Integer, Y As Integer, i As Integer
'Dim Sht As Worksheet, DotRng As Range
'Set Sht = ActiveSheet
Dim BestMaskNumber As Integer
ReDim QRBitData(0 To ModuleSize - 1, 0 To ModuleSize - 1)
ReDim QRMaskedArray(0 To 7, 0 To ModuleSize - 1, 0 To ModuleSize - 1)
Call QRDrawPatterns
Call QRDrawData(Data)
Call QRDrawVersionInfo
For i = 0 To 7
Call ApplyMask(QRBitData, QRMaskedArray, i)
Call QRDrawFormatInfo(QRMaskedArray, i, i)
Next i
BestMaskNumber = EvaluateMask(QRMaskedArray)
If Debug_Draw_On_Excel_Sheet Then
'Application.ScreenUpdating = False
For i = BestMaskNumber To BestMaskNumber
For X = 0 To ModuleSize - 1
For Y = 0 To ModuleSize - 1
If QRMaskedArray(i, X, Y) = 1 Then
'Set DotRng = Sht.Cells(Y * 1 + 1, X * 1 + 1)
'DotRng.Resize(1, 1).Interior.Color = RGB(0, 0, 0)
End If
Next Y
Next X
Next i
'Application.ScreenUpdating = True
End If
End Sub
|
|