{"id":116,"date":"2019-04-10T20:32:40","date_gmt":"2019-04-10T20:32:40","guid":{"rendered":"https:\/\/keithratner.live\/optionexplicit\/?p=116"},"modified":"2019-04-26T21:04:29","modified_gmt":"2019-04-26T21:04:29","slug":"matchespattern","status":"publish","type":"post","link":"https:\/\/keithratner.live\/optionexplicit\/matchespattern\/","title":{"rendered":"MatchesPattern"},"content":{"rendered":"<pre>Public Function MatchesPattern( _\r\n    strInputTest As String, _\r\n    strInputPattern As String, _\r\n    Optional IgnoreCase As Boolean = True, _\r\n    Optional IsGlobal As Boolean = True _\r\n) As Boolean\r\n    On Error GoTo Catch\r\n    Dim objRegExp As New RegExp\r\n    Set objRegExp = Nothing\r\n    objRegExp.IgnoreCase = IgnoreCase\r\n    objRegExp.Global = IsGlobal\r\n    objRegExp.Pattern = strInputPattern\r\n    MatchesPattern = objRegExp.Test( _\r\n        strInputTest _\r\n    )\r\n    Set objRegExp = Nothing\r\n    Exit Function\r\nCatch:\r\n    Set objRegExp = Nothing\r\nEnd Function<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Public Function MatchesPattern( _ strInputTest As String, _ strInputPattern As String, _ Optional IgnoreCase As Boolean = True, _ Optional IsGlobal As Boolean = True _ ) As Boolean On Error GoTo Catch Dim objRegExp As New RegExp Set objRegExp = Nothing objRegExp.IgnoreCase = IgnoreCase objRegExp.Global = IsGlobal objRegExp.Pattern = strInputPattern MatchesPattern = objRegExp.Test( _ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":124,"comment_status":"open","ping_status":"open","sticky":false,"template":"page-templates\/full-width-no-post-thumbnail.php","format":"standard","meta":{"inline_featured_image":false,"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5,4,6,3],"tags":[],"class_list":["post-116","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code","category-distribution","category-snippets","category-vba"],"krwpengineoptions-featuredonwpengineblog":"","jetpack_featured_media_url":"https:\/\/i0.wp.com\/keithratner.live\/optionexplicit\/wp-content\/uploads\/sites\/29\/2019\/04\/matchespattern.png?fit=318%2C299&ssl=1","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pgsIIA-1S","jetpack-related-posts":[{"id":175,"url":"https:\/\/keithratner.live\/optionexplicit\/folderexists\/","url_meta":{"origin":116,"position":0},"title":"FolderExists","author":"Keith","date":"July 8, 2019","format":false,"excerpt":"Function FolderExists( _ strCompleteFolderPath As String _ ) As Boolean Dim _ fs As Object Set _ fs = _ CreateObject( _ \"Scripting.FileSystemObject\" _ ) FolderExists = _ fs.FolderExists( _ strCompleteFolderPath _ ) Set _ fs = _ Nothing End Function","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/keithratner.live\/optionexplicit\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":177,"url":"https:\/\/keithratner.live\/optionexplicit\/workbooksheetexists\/","url_meta":{"origin":116,"position":1},"title":"WorkbookSheetExists","author":"Keith","date":"July 10, 2019","format":false,"excerpt":"Public Function WorkbookSheetExists( _ wb As Workbook, _ strSheetName As String _ ) As Boolean Dim ws As Worksheet WorkbookSheetExists = False For Each ws In wb.Sheets If ws.Name = strSheetName Then WorkbookSheetExists = True End If Next ws End Function","rel":"","context":"In &quot;VBA&quot;","block_context":{"text":"VBA","link":"https:\/\/keithratner.live\/optionexplicit\/category\/vba\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":113,"url":"https:\/\/keithratner.live\/optionexplicit\/slicercount\/","url_meta":{"origin":116,"position":2},"title":"SlicerCount","author":"Keith","date":"April 9, 2019","format":false,"excerpt":"Public Function SlicerCount( _ scl As SlicerCacheLevel, _ Optional NonBlankOnly As Boolean = True, _ Optional Verbose As Boolean = True _ ) Dim si As SlicerItem Dim iCount As Integer Dim iVerboseCount As Integer Dim iTotal As Integer iCount = 0 If Verbose Then iVerboseCount = 0 iTotal =\u2026","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/keithratner.live\/optionexplicit\/category\/code\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/keithratner.live\/optionexplicit\/wp-content\/uploads\/sites\/29\/2019\/04\/slicercount.png?fit=332%2C568&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":125,"url":"https:\/\/keithratner.live\/optionexplicit\/vbcomponentnameisunique\/","url_meta":{"origin":116,"position":3},"title":"VBComponentNameIsUnique","author":"Keith","date":"April 10, 2019","format":false,"excerpt":"Public Function VBComponentNameIsUnique( _ wb As Workbook, _ strInputName As String _ ) As Boolean Dim vbc As VBComponent VBComponentNameIsUnique = True For Each vbc In wb.VBProject.VBComponents If vbc.Name = strInputName Then VBComponentNameIsUnique = False End If Next vbc End Function","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/keithratner.live\/optionexplicit\/category\/code\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/keithratner.live\/optionexplicit\/wp-content\/uploads\/sites\/29\/2019\/04\/vbomponentnameisunique.png?fit=324%2C200&ssl=1&resize=350%2C200","width":350,"height":200},"classes":[]},{"id":83,"url":"https:\/\/keithratner.live\/optionexplicit\/haskey\/","url_meta":{"origin":116,"position":4},"title":"HasKey","author":"Keith","date":"April 8, 2019","format":false,"excerpt":"Function HasKey( _ coll As Collection, _ index As Variant _ ) As Boolean On Error GoTo ErrorHandler Dim elTest As Variant HasKey = False elTest = coll(index) HasKey = True Exit Function ErrorHandler: End Function","rel":"","context":"In &quot;Code&quot;","block_context":{"text":"Code","link":"https:\/\/keithratner.live\/optionexplicit\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":609,"url":"https:\/\/keithratner.live\/optionexplicit\/iscellhighlighted\/","url_meta":{"origin":116,"position":5},"title":"IsCellHighlighted","author":"Keith","date":"May 24, 2024","format":false,"excerpt":"Function IsCellHighlighted(cell As Range) As Boolean IsCellHighlighted = (cell.Interior.ColorIndex <> xlNone)End Function","rel":"","context":"Similar post","block_context":{"text":"Similar post","link":""},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/posts\/116","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/comments?post=116"}],"version-history":[{"count":3,"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/posts\/116\/revisions"}],"predecessor-version":[{"id":123,"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/posts\/116\/revisions\/123"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/media\/124"}],"wp:attachment":[{"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/media?parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/categories?post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/keithratner.live\/optionexplicit\/wp-json\/wp\/v2\/tags?post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}