Kamis, 22 Juni 2023

QR COde

 Function Buat_QR(codetext As String)

Dim URL As String, MyCell As Range

Set MyCell = Application.Caller

URL = "https://chart.googleapis.com/chart?chs=125x125&cht=qr&chl=" & codetext

On Error Resume Next

ActiveSheet.Pictures("MyQR_" & MyCell.Address(False, False)).Delete

On Error GoTo 0

ActiveSheet.Pictures.Insert(URL).Select

With Selection.ShapeRange(1)

.PictureFormat.CropLeft = 2

.PictureFormat.CropRight = 2

.PictureFormat.CropTop = 2

.PictureFormat.CropBottom = 2

.Name = "MyQR_" & MyCell.Address(False, False)

.Left = MyCell.Left + 25

.Top = MyCell.Top + 5

End With

Buat_QR = "" ' Masukkan text sebagai optional

End Function


Tidak ada komentar:

Posting Komentar

Menghitung USIA Excel

=BYROW(D2:D100; LAMBDA(tanggal_lahir;     IF(tanggal_lahir=""; "";         DATEDIF(tanggal_lahir; TODAY(); "y"...