Excel VBA follows object hierarchy. We can refer a single Worksheet object in 3 ways with worksheet name with index number with codeName codeName remains the same even if worksheets are renamed or moved. But we can use CodeName only if it is in the same workbook.
Category Archives: vba
[VBA][Excel Learning] – A little bit about Variant
If you want a variable which can hold any type of value, then declare that variable of type Variant.
[Excel Learning]- How to clear excel sheet
Use Cells.ClearContents to clear the excel sheet. You can use command button to do on user command Private Sub CommandButton3_Click()Cells.ClearContentsEnd Sub
[Vb]How to comment in the vb code
You can comment in vb code using the symbol (‘).