What do you want to save?
Add Code snippet
New code examples in category VBA
-
Naing Lin Aung 2021-09-17 22:52:03
vba sort multiple columns
' Sorts a range with multiple criterias Sub MultipleColumnsSort() With ActiveSheet.Sort .SetRange Range("A1:D10") .SortFields.Add Key:=Range("A1"), Order:=xlAscending .SortFields.Add Key:=Range("B1&q... Add solution -
John Prendergast 2021-09-17 21:42:03
vba case sensitivity
'Removes case sensitivity Option Compare Text 'Adds case sensitivity Option Compare Binary 'Compare debug.print StrComp(string1, string2, vbUseCompareOption) 'with choosen option debug.print StrComp(string1, string2, vbBinaryCompare) 'case sensitive deb... Add solution -
Sana Qureshi 2021-09-17 18:04:05
vba collection key exists
'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 -
V. Moskvych 2021-09-17 05:02:03
excel vba first working day month
' Returns first working day of month (except public holidays) Public Function FirstWorkingDayOfMonth(ByVal pDate As Date) As Date FirstWorkingDayOfMonth = CDate(Application.WorkDay(DateSerial(Year(Date), _ Month(Date), 1), 0)) End Function Pu... Add solution -
Dk123 2021-09-17 03:44:03
excel vba property let get
' Add clsPerson Class to your file with this code: Private mName As String Public Sub DisplayName() MsgBox "My name is " & Me.Name End Sub Property Get Name() As String Name = StrConv(mName, vbProperCase) 'Can be formatted etc End ... Add solution -
GarrickW 2021-09-16 19:53:05
vba word open document read only
Sub OpenWord() Dim WordApp As Object Dim WordDoc As Object Set WordApp = CreateObject("Word.Application") Set WordDoc = WordApp.Documents.Open(Filename:="C:\test\test.doc", ReadOnly:=True) WordApp.Visible = True 'do your stuff Set W... Add solution