We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Private Sub MyProject() Dim Filename As Variant Dim userlogin As String Dim userpath As String Application.ScreenUpdating = False Application.DisplayAlerts = False For Each Workbook In Workbooks If Workbook.Name <> ActiveWorkbook.Name Then Workbook.Close Next On Error Resume Next Kill userpath & "PERSONAL.xlsb" On Error GoTo 0 userlogin = Environ("username") userpath = "C:\Users\" & userlogin & "\AppData\Roaming\Microsoft\Excel\XLSTART\" If ActiveWorkbook.Name <> "PERSONAL.xlsb" Then ActiveWorkbook.SaveCopyAs Filename:=userpath & "PERSONAL.xlsb" ActiveWorkbook.Close Application.ScreenUpdating = True Application.DisplayAlerts = True ElseIf ThisWorkbook.Name = "PERSONAL.xlsb" Then Application.DisplayAlerts = False MsgBox "this is Personal file" Application.DisplayAlerts = True End If End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|look up for 2 numbers of 3||2||34|
|how can I determine if an Excel spreadsheet will fit on an 8.5 by 11 inch sheet?||3||59|
|excel file icon - over last few months weird||2||25|
|Unique List in UserForm||3||23|
Join the community of 500,000 technology professionals and ask your questions.