What do you want to save?
Add Code snippet
New code examples in category VBA
-
Phoenix Logan 2022-02-02 18:50:10
vba text max line length
' Max line length inside a text Public Function MaxLineSize(ByVal pText As String) Dim lines() As String Dim line As Variant lines = Split(pText, vbCrLf) If UBound(lines) - LBound(lines) + 1 = 0 Then Exit Function For Each line In lines ... Add solution -
Awgiedawgie 2022-02-02 18:11:44
how to remove an item from a list in vb.net
Dim aList As New List(Of String) aList.Add("Hello") aList.Add("Delete Me!") aList.Add("World") 'Remove the item from the list at index 1 aList.RemoveAt(1) 'Remove a range of items from a list, starting at index 0, for a cou... Add solution -
Phoenix Logan 2022-02-02 13:45:59
excel vba check if key is in collection
'A Dictionary is a better choice when you need to determine if a key 'is already in the collection. But here is a VBA function that 'reports True or False for Collections: Function KeyExists(key$, c As Collection) On Error Resume Next c.Item key K... Add solution -
Lionel Aguero 2022-02-01 22:25:48
excel vba modulo
'VBA does have the 'Mod' operator: MsgBox 5 Mod 2 '<--displays: 1 (5 ÷ 2 has a REMAINDER of 1) 'But bear in mind that it returns an integer value... always. MsgBox 11.5 Mod 3 '<--displays: 0 (But it should be 2.5) 'And in... Add solution -
Awgiedawgie 2022-02-01 09:21:59
excel vba last row of range
Dim rRange As Range Dim rDuplicate As Range Set rRange = ActiveSheet.UsedRange lFirstRow = rRange.Row lLastRow = rRange.Rows.Count + rRange.Row - 1 lFirstColumn = rRange.Column lLastColumn = rRange.Columns.Count + rRange.Column - 1 ' New reference to cur... Add solution
Best helpers
Ranking is empty