Excel VBA Macro: Access Your Macro From Any Workbook (PERSONAL.XLSB)
Excel VBA Macro: Access Your Macro From Any Workbook (PERSONAL.XLSB)
💥Subscribe: / @greggowaffles
Code:
Sub worksheet_sizes_w_msgbox()
Dim temp_book As String
Dim ws As Worksheet
Dim message As String
Application.ScreenUpdating = False
temp_book = ThisWorkbook.Path & "\Temp.xls"
For Each ws In ActiveWorkbook.Worksheets
ws.Copy
ActiveWorkbook.SaveAs temp_book
ActiveWorkbook.Close savechanges:=False
message = message & ws.Name & ": " & _
FileLen(temp_book) / 1000 & " KB" & vbNewLine
Kill temp_book
Next
Application.ScreenUpdating = True
MsgBox message
End Sub
#excelmacro #excelvba
Пікірлер: 6
How remove it?
Your tutorials are fun, easy to understand and always connected to real world scenarios. Keep up the good work
@greggowaffles
Жыл бұрын
Wow! Appreciate you! Thanks a lot!!
@greggowaffles
Жыл бұрын
It is ok if I paraphrase what you said in my about me section? I feel like it encompasses everything my channel is about
@alexrosen8762
Жыл бұрын
@@greggowaffles Sure! I also want to seize the opportunity to thank you cause we (the financial team) have used the solution in your tutorial to automate part of our budget and forecast processes 🙏
@greggowaffles
Жыл бұрын
That’s awesome! Thank you so much 🙏