📊 VBA (Excel)

Apply Increase Icon Cache Size (VBA)

Raises the icon cache limit, useful on machines with huge numbers of shortcuts. Applied via WScript.Shell.RegWrite from VBA.

By WindowsScripting.com · 421 B
IncreaseIconCacheSizeRegSet.bas
Attribute VB_Name = "IncreaseIconCacheSizeRegSet"
Option Explicit

Public Sub IncreaseIconCacheSizeRegSet()
    Dim wsh As Object
    Dim regPath As String

    Set wsh = CreateObject("WScript.Shell")
    regPath = "HKEY_CURRENT_USER\Software\Microsoft\Windows\Explorer\Max Cached Icons"

    wsh.RegWrite regPath, "4096", "REG_SZ"

    MsgBox "Increase Icon Cache Size applied." & vbCrLf & regPath, vbInformation
End Sub