What do you want to save?
Add Code snippet
New code examples in category VBA
-
SBirch 2021-08-29 12:08:02
excel vba count words
'Fast VBA function to count the words in a string. Words are delimited by 'white space. White space is ASCII 0 thru 32. Function WordCount&(s$) Dim i&, b() As Byte If 0 = LenB(s) Then Exit Function b = s If b(0) > 32 Then WordC... Add solution -
Sebastian K 2021-08-28 22:14:01
xlbycolumns is not declared
Excel.SearchOrder.xlByColumns Add solution -
Atmega 328 2021-08-28 06:53:02
excelvba declare global constant
'In VBA, GLOBAL variables must be declared ABOVE all procedures in a module: Public MyGlobalString As String '<-- global to ALL modules Private MyGlobalLong As Long '<-- global to THIS module (Private) Public Const HELP As String = "Pres... Add solution -
Mr. L 2021-08-27 23:13:01
excel vba hide multiple sheets at once
Sheets(arr).Visible = False 'Note1: For this to work without an error, 'arr' needs to be a 1D array with a ' valid and actual sheet name in each element. 'Note2: An array cannot be used to make sheets visible if they are hidden. ' This arra... Add solution -
AmatuerDev 2021-08-27 19:24:02
vba implements
' Add class ClsInterface: Public Function add(x As Integer, y As Integer) As Integer End Function '----------------------------------------------------------------------- ' Add class ClsMyClass: add(...) is Private Implements ClsInterface Private Function... Add solution -
Rashedul Alam 2021-08-27 15:29:02
vba make a short integer from two bytes
Public Function MakeInteger%(LoByte As Byte, HiByte As Byte) If HiByte And &H80 Then MakeInteger = ((HiByte * &H100&) Or LoByte) Or &HFFFF0000 Else MakeInteger = (HiByte * &H100) Or LoByte End If End Function Add solution -
Sola Ajiboye 2021-08-27 09:27:02
office vba like operator
'VBA's Like operator can be used to determine if 'one string is contained in another: MsgBox "Excel Hero" Like "*Hero" 'Displays: True 'Notice that 'Find' supports wild card characters. 'Full documentation: ' https://docs.micro... Add solution -
Lor F. 2021-08-27 00:50:02
vba redim preserve
Dim MyArray() As String ReDim MyArray(1) MyArray(0) = "zero" MyArray(1) = "one" ReDim Preserve MyArray(2) MyArray(2) = "two" MsgBox MyArray(0) & " " & MyArray(1) & " " & MyArray(2) Add solution
Best helpers
Haejin Lee
+5
Terry claw
+5
Bryan Pettit
+5
Root
+5
Meredithob
+5
Orgillion
+5
Barrie
+5
Victor Engel
+5
Muazam
+5
Rohan Wagle
+5
DanH
+5
Mujah_d
+5
Soks
+5
Bhavya PH
+5