The Excel Workbook object is a part of the Workbooks collection. The events are the code, which is “activated” or “triggered”, once a specific event happens. These events are different and could be unlimited, but there are a few built-in Workbook…
Writing for RegEx in VBA is sometimes a good idea and sometimes a bad idea. Anyway, if you need to write one, you better be careful. These are the RegEx articles in VBA in VitoshAcademy so far: https://www.vitoshacademy.com/vba-regex-in-excel-part-2/ https://www.vitoshacademy.com/vba-regex-in-excel/ So,…
Selecting multiple cells in Excel through VBA may be quite a difficult task. Although, using Select is not always a good practice, sometimes it should be done. To generate some numeric values, let’s run the following:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
Public Sub FullMe() Dim myCell As Range Dim myRange As Range Dim cnt As Long Set myRange = Range("A1:F20") For Each myCell In myRange myCell = cnt If cnt = 6 Then cnt = 1 cnt = cnt + 1 Next myCell End Sub |
After this, we have…
Add comments in Excel with VBA
Adding comments with VBA is somehow quite a trivial task, if you already have the text of the comment and you are allowed to delete the comment if it is present. In general, the only difficult part is the check,…