VBA to Clear Cache in Excel

Pinaceous

Well-known Member
Joined
Jun 11, 2014
Messages
1,113
Office Version
  1. 365
Platform
  1. Windows
Good Day All,

Is there a vba macro to clear cache in excel?

For example as in;

Clear Cache in Excel

Please let me know!

Thank you!
pinaceous
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
I am guessing that it could be done via SendKeys:

Alt f
t
s
Alt d
Alt d
Space bar
Tab
Space bar


But I am not that familiar with that type of coding.
 
Upvote 0
I am guessing that it could be done via SendKeys:

Alt f
t
s
Alt d
Alt d
Space bar
Tab
Space bar


But I am not that familiar with that type of coding.

Okay thank you for responding but I'm looking for a vba solution.

When I go to record a macro for that purpose it turns up blank.

Do you know if there is a macro solution?
 
Upvote 0
I gave the hint for the VBA solution ... SendKeys
 
Upvote 0
Good Day,

In working with the provided suggestions of this post above, is there a way to access the Delete Cached Files icon in the screen shot below in lieu of using the send keys tab key (17 x's) then the spacebar?

Thanks!
pinaceous



Capture.PNG
 
Upvote 0
What code are you using to get to that point?
Good Day johnnyL,



VBA Code:
Sub Macro4()
'
' Macro4 Macro
'

'
    Range("A1").Select
   
    SendKeys "%"
   
    SendKeys "(F)"
   
    SendKeys "(T)"
   
    SendKeys "^"
   
    SendKeys "(S)"
   
       
    SendKeys "%"
   
    Application.SendKeys "(D)"
   
   
    Application.SendKeys ""
    'SendKeys "(TAB)"
    'SendKeys "(TAB)"
    'SendKeys "(TAB)"
    'SendKeys "(TAB)"
    'SendKeys "(TAB)"
    'SendKeys "(TAB)"
    'SendKeys "(TAB)"
   
    'Application.SendKeys ("%mn")
   
End Sub



I cannot get the last half to work.

Thank you!

pinaceous
 
Upvote 0
That code does not get you to the window you showed.
 
Upvote 0
I saw this on the web. Is it what you're looking for?
VBA Code:
Application.RecentFiles.Maximum = 0
 
Upvote 0

Forum statistics

Threads
1,216,081
Messages
6,128,695
Members
449,464
Latest member
againofsoul

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top