kelly mort
Well-known Member
- Joined
- Apr 10, 2017
- Messages
- 2,169
- Office Version
- 2016
- Platform
- Windows
I have this code here, to create qr code. It's doing well getting the code.
But I am thinking of having a pre-created barcode control, where I only run the code to load the control instead of creating new one each time.
Maybe, the sheet change event will do the job. But since this object is new to me, I have no idea what to code down.
I have the feeling someone have the solution.
But I am thinking of having a pre-created barcode control, where I only run the code to load the control instead of creating new one each time.
Maybe, the sheet change event will do the job. But since this object is new to me, I have no idea what to code down.
I have the feeling someone have the solution.
Code:
Sub setQR()
Dim xObjOLE As OLEObject
On Error Resume Next
Application.ScreenUpdating = False
Set xObjOLE = ActiveSheet.OLEObjects.Add("BARCODE.BarCodeCtrl.1")
xObjOLE.Object.Style = 11
xObjOLE.Object.Value = [A1].Text
Application.ScreenUpdating = True
End Sub