Open Last Modified Excel File From A Folder Through Vba

Dear All,   We can use below vba code to open last modified excel file from a folder.   Sub Last_Modified_File() x = InputBox(“put Folder Path”) folder_name = x & “\” flname = Dir(folder_name & “*.xlsx”) Do While Len(flname) > 0 dttime = FileDateTime(folder_name & flname) If dttime > qq Then qq = dttime End If flname = Dir() Loop folder_name = x & “\” flname = Dir(folder_name & “*.xlsx”) Do While Len(flname) > 0 dttime = FileDateTime(folder_name & flname) […]

Read more

Function to Extract first name

To make a Function in Excel VBA Macro to Extract First Name Excel VBA में एक फंक्शन बनाना है, जो First Name या word को किसी सेल से निकाले.   When we make a macro then we type Sub then macro name like copydata, example given below. जब हम Macro बनातें हैं, तो हम Sub से स्टार्ट करते हैं, फिर मैक्रो का नाम देते हैं. उदाहरण के लिए Sub copydata() End Sub But when we make any function in excel vba then […]

Read more