What do you want to save?
Add Code snippet
New code examples in category VBA
-
Phoenix Logan 2022-03-01 09:15:10
excel vba check for uninitialized or empty array
'In VBA an un-itialized dynamic array will raise a run-time error if 'code attempts to read from... or write to it. 'VBA function to test if an array is ready for access: Function ArrayReady(a) As Boolean On Error Resume Next ArrayReady = Not LB... Add solution -
Awgiedawgie 2022-02-28 11:20:01
excel vba force array elements to alphanumeric
'VBA function (extremely fast) to force an array column 'to ONLY alpha-numeric characters (with spaces): Function ForceArrayColumnAlphaNumeric(v, Optional col& = 1) Dim i&, j&, p&, max&, t& Dim b() As Byte, res() As Byte,... Add solution -
A-312 2022-02-26 21:40:01
excel vba test if particular bits set in long
'Fast VBA function to test if specific bits are set 'within a 32-bit Long integer. If ALL specified bits are set then 'this function returns True. If ANY of the specified bits are 'not set then this function returns False. 'Bits are numbered from 0 to ... Add solution -
Awgiedawgie 2022-02-25 05:20:02
excel vba multiple string search with InStr function
'VBA function to check if ANY of a list of substrings is contained 'within a string: Function AnyIn(s$, ParamArray checks()) As Boolean Dim e For Each e In checks If InStrB(s, e) Then AnyIn = True: Exit Function Next End Function '... Add solution -
Awgiedawgie 2022-02-24 21:25:02
excel vba set border around range
'VBA routine to set the border AROUND or THROUGH a range: Sub SetRangeBorders(r As Range, Optional edges As Boolean = 1, Optional stl = 1, Optional clr = 0, Optional wgt = 2) Dim e If edges Then For Each e In Array(xlEdgeLeft, 8, 9, 10) ... Add solution -
Krish 2022-02-24 17:50:03
vba code to file download from another folder
'In this Example I am Copying the File From "C:Temp" Folder to "D:Job" Folder Sub sbCopyingAFile() 'Declare Variables Dim FSO Dim sFile As String Dim sSFolder As String Dim sDFolder As String 'This is Your File Name which you want to... Add solution