Last seen: Mar 17, 2025
You can use the FileSystemObject to loop through the txt files in that folder, until you find the one you want.
Hi Ritabrata, Impossible to debug what you did without your test file, can you upload a sample file that reproduces the error mentioned?
Macros cannot run in Onedrive and cannot be edited in Excel Online. You cannot edit a macro without opening the file on desktop, not sure why you wa...
Now I am confused: If nothin else, I am confused. When I run the macro now, I get 3 separate message boxes that appear one after another (when o...
Hi Dorsa, Added a function that creates a dictionary, this allows you to check if a specific item exists. Updated and cleaned up some of your co...
Hi Nabila, 1. If the user "Leave date" 13-Jul-22", "Payroll Status" is "Inactive". The result in "Active" field is "No" and "custom_field: Las...
You have to set the print area, the code does not do that, just prints what you have set. You can view the print area from ribbon: View>Page Bre...
You can use Me.Unprotect at the beginning of the code, and Me.Protect at the end of code. (will be protected without a password) But you have to ma...
I need both of them! then use both codes provided. this excel is in the share and the sheet and the workbook is protected, so the code is no...
The formula below means G10=G9-Q9: Cells(Target.Row, "G").Offset(1, 0).Formula = "=" & Cells(Target.Row, "G").Address(False, False) & "-" &...
Ok, added code to copy row formats and values: If Not Intersect(Target, Range("Q2:Q1000")) Is Nothing Then If Cells(Target.Row, "G") <> 0 A...
The code you have is triggered by Worksheet Change event. You want to insert new rows based on sheet changes as well? If column Q should insert...
Hi Faisal, I suggest learning all native Excel tools before using VBA, because many things can be done with a proper excel setup, without vba. Y...
No file attached, please make sure you press the Start Upload button after you use the Add Files to Queue button.
Hi Sherry, Based on your initial sample file, the code works, you can see the results: Are you sure they are comments? Maybe those are... Notes...