Relative Content

Tag Archive for excelvbamacros

PivotTable Refresh Macro when there are changes in the Worksheet

My goal is to refresh the pivot tables of a worksheet, when changes are done to some cells. These cells contain percentages which influence the pivot tables, and are the only cells that are edited.
This is the code I have so far, but when I run it, it gives me this error: “Run-time error ‘424’: Object required”, and it points to Line 4.

renaming files in folder from excel

i’m trying to rename files in a specific folder, using a list of new names in a column of an excel file.In the following code i’ve tried just with one file without loop. It returns ‘runtime errore 53’ – ‘impossible to find the file’. What i found confusing is that in the error line ‘name nome_vecchio as nome_nuovo’ the pop up is giving me the right names.
Thank you in advance for your help.

Delete cells to autofit columns to default size

I am using the below code to delete cells and autofit all columns in multiple sheets to default size. I am not a good writer of codes but used this to get results. My query, Is there a way to do this with better code.