LoginSignup
0
5

More than 3 years have passed since last update.

QRコードにしてクリップボードに格納するExcelマクロ

Last updated at Posted at 2020-01-15

これは

QRコードにしてクリップボードに格納するだけのちょっとしたExcelマクロです。

'アクティブセルの値をQRコードにしてクリップボードに格納
Sub QRCodeFromCellValue()
    With ActiveSheet.OLEObjects.Add("BARCODE.BarCodeCtrl.1")
        .Object.Style = 110
        .LinkedCell = ActiveCell.Address
        .Top = .Top + ActiveCell.Height
        .CopyPicture , xlBitmap
       .Delete
    End With
'    ActiveCell.Offset(1).Select
'    ActiveSheet.Paste
End Sub

使い方

QRコードに変換したい文字列のセルを選択した状態で、このマクロを実行。
あとは、好きなところに貼り付けてください。
barcode.png

使い道

・・・わかりません。

補足

  • 参照設定:Microsoft Access BarCode Control 14.0
  • Office 365 Business のExcelで試しました。他のバージョンで動くかどうかはわかりません。
  • 日本語には非対応みたいです。また、文字数の上限はたぶん255文字だと思います。
0
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
5