Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
This is my ImportModule code:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim Usr As String Usr = WorksheetFunction.VLookup(Environ("Username"), [Users], 2, 0) [N1] = "Last saved by " & Usr & " @ " & Format(Now, "h:mm AM/PM") & " on " & Format(Now, "m/d/yyyy") ActiveWorkbook.Save End Sub
And this is the code I want to import into the ThisWorkbook module:
Sub ImportModule() Dim xMod As String xMod = "H:\Depts\css\A_ILS & Reliability\Reliability\1-CURRENT\System Reporting\SDAE\WeeklySummaries\Macros\ThisWorkbook.cls" ActiveWorkbook.VBProject.VBComponents.Import xMod End Sub
VBA allows me to export the ThisWorkbook module as a .cls file which upon import creates a class module named "ThisWorkbook1," which of course doesn't help.
Sub WhoSavedMe() Dim Usr As String Usr = WorksheetFunction.VLookup(Environ("Username"), [Users], 2, 0) [N1] = "Last saved by " & Usr & " @ " & Format(Now, "h:mm AM/PM") & " on " & Format(Now, "m/d/yyyy") ActiveWorkbook.Save End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|need copy macro to select range to copy||23||48|
|Excel shared spreadsheet||12||38|
|VBA error subscript out of range help||5||29|
|where can i download QDE (Quick Date Entry) add-in for Excel?||4||22|
Join the community of 500,000 technology professionals and ask your questions.