Now you can use the properties and methods of the barcode object as you like: ' set propertiesĪctiveSheet.OLEObjects(MyBarcode). = 8ĪctiveSheet.OLEObjects(MyBarcode).Object.Type = 14 ' Code 128ĪctiveSheet.OLEObjects(MyBarcode).Object.Text = Range("C3") To get easy access to the control we remind the name of the control in a variable named 'MyBarcode': MyBarcode = ActiveSheet.Shapes().Name The following function will create the barcode control directly above the cell: (ClassType:="ACTIVEBARCODE.BarcodeCtrl.1", Link:=False, _ĭisplayAsIcon:=False, Width:=MyWidth, Height:=MyHeight, Top:=MyTop + 2,_ So we resize the height of the cell to 30 pixels: ' Enlarge the cell height to 30 pixels If the cell is too smalla 'Size error' will be displayed. Please note that a cell should have a minimum size so the barcode can fit into it. Thenit looks like the barcode would be inside a cell.įirst we read the cells size: CurrentCell = "C3" In this example a barcode control will be placed directly above a cell. You can use VisualBasic for Applications (VBA) to solve many things in Excel.Here we will show you how to embed, use and delete the ActiveBarcode control with VBA:Įmbedding the ActiveBarcode Control into a Sheet:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |