Welcome to the Renumber Files repository by the EslamHub channel! ๐
This repository includes an Excel file to easily and quickly rename folder file numbers using VBA,
along with two text files containing the VBA code used in the workbook.
- ๐ RenumberFiles.xlsm: A ready-to-use Excel file for renaming files.
- ๐งพ Workbook_Open-Event.txt: The
Workbook_Open
event code (insideThisWorkbook
). - ๐งพ RenumberFiles-Module.txt: The main renumbering code (a standalone module inside Excel).
To enable automatic execution when opening the file, open the Workbook_Open
event inside the ThisWorkbook window,
or open the Workbook_Open-Event.txt
file, and look for the line:
#If False Then
Then change False to True, so the line becomes:
#If True Then
After execution is complete, a message will appear allowing you to choose whether to open the file or close it.
To change the separator (such as _
) used before numbering, open the RenumberFiles-Module.txt
file or the code module inside Excel,
and look for the line:
Const del$ = "_"
Then change _
to any separator you want, such as -
or .
.
When you run the tool, it will prompt you to select a folder.
The default path is the same as the Excel file location.
You will be prompted to enter the following values:
- Start Number: The beginning of the numbering.
- End Number: The end of the numbering.
- Number Format: Number of digits (e.g., 2 โ
00
, 3 โ000
). - Change Amount: Such as
+1
,-2
, or0
if you just want to format numbers.
๐บ YouTube ๐ฑ TikTok ๐ข LinkedIn ๐ฆ X ๐ Facebook ๐ธ Instagram
#Excel #VBA #FileRenaming #EslamHub