Search results
30 gru 2018 · I think this is the most reliable way to get the desktop path which isn't always the same as the username. MsgBox CreateObject("WScript.Shell").specialfolders("Desktop")
11 lip 2020 · Sub seetest() Filename = ActiveWorkbook.Name user = Environ("Username") desktop = "C:\Users\" & user & "\Desktop\" today = Format(Now(), "DD-Mmm-YYYY") newfilename = Left(Filename, InStr(Filename, ".")
Save a File to the Desktop with VBA. The following is a simple Excel VBA example of copying data from the current workbook and saving the file to the desktop. The procedure will then save the file and close it leaving the user on the original sheet.
19 wrz 2018 · The code below will save a file to the Desktop, regardless of the Users Name. Dim Path As String. Path=Createobject ("WScript.Shell").SpecialFolders ("Desktop") & "\". ActiveWorkbook.SaveAs Path & "XL File.xls". ___________________________________________________________________. Power to the Developer!
28 kwi 2014 · I'm looking for Excel to create a folder in Documents\Work_Documents\Daily_Work_Notes based on that day's date and save a file with the value in cell B1 on the sheet named 'Working Ticket'. Any help would be GREATLY appreciated.
21 lip 2024 · AFAIK, you cannot use vba to directly save to a web url (including SharePoint). You need to get the UNC path to the server and use that. If you can create your own mapping to the server (e.g. map M drive) you will find it in the properties sheet for the mapping.
To save an Excel workbook using VBA, you need to use the SAVE method to write a macro. And in that macro, you need to specify the workbook that you want to save and then use the SAVE method. When you run this code, it works like the keyboard shortcut (Control + S).